Database Reference
In-Depth Information
SET CONTAINER_DATA This setting lets user c##my_dba see the active sessions in the
PDB1 , PDB2 , and LNE6 PDBs, as well as the root when they query the V$SESSION view
from the root.
SQL> CONNECT C##my_dba/secret
Connected.
SQL> SELECT SID, USERNAME, CON_ID
2 FROM V$SESSION
3 WHERE USERNAME IS NOT NULL
4 ORDER BY CON_ID, USERNAME, SID
5 /
SID USERNAME CON_ID
---------- ------------------------------ ----------
11 C##MY_DBA 1
253 LNE6_ADMIN 6
SQL>
In Exercise 14.1, we will step through the process to create common and local users. We
will also attempt to create users that violate the rules for common and local users, resulting
in ORA errors.
exeRCiSe 14.1
Creating Common and local Users
In this exercise you will create common users and local users.
1. Launch a command-line window:
a.
From the Windows Start menu, search for “CMD” or press the Windows command
button and the R key simultaneously and then enter CMD .
b.
At the C:\> prompt, specify an instance identifier (SID), unique to this server and
database domain, for the container database you wish to connect to.
C:\ set ORACLE_SID=CONT
2. Set the required environment variables. ORACLE_HOME is required on some operating
systems.
C:\ set ORACLE_HOME= C:\Oracle\product\12.1.0\dbhome_2
3. Connect to the root of the CDB specified by the ORACLE_SID , with user SYS as SYSDBA,
using OS authentication.
C:\>sqlplus / as sysdba
Search WWH ::




Custom Search