SQL> select name, pdb from v$services; NAME PDB ------------------------------ ------------------------------ pdb2 PDB2 pdb1 PDB1 test12cXDB CDB$ROOT test12c CDB$ROOT SYS$BACKGROUND CDB$ROOT SYS$USERS CDB$ROOT
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO 4 PDB2 MOUNTED
SQL> show con_name CON_NAME ------------------------------ PDB1
SQL> alter session set container=CDB$ROOT;
SQL> show con_name CON_NAME ------------------------------ CDB$ROOT
SQL> show parameter local_listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ local_listener string LISTENER_TEST12C
[oracle@oracle12c-test admin]$ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. TEST12C1 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle12c-test)(PORT = 1522)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522)) ) )
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. TEST12C = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle12c-test)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test12c) ) ) LISTENER_TEST12C = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle12c-test)(PORT = 1522))