SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> col name format a20
SQL> select name, open_mode from v$pdbs;
NAME OPEN_MODE
-------------------- ----------
PDB$SEED READ ONLY
ORCLPDB READ WRITE
PDB1 READ WRITE
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB READ WRITE NO
4 PDB1 READ WRITE NO
SQL> alter session set container=pdb1;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
PDB1
SQL>
SQL> select name from v$services;
NAME
--------------------
pdb1
SQL> show parameter domain
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_domain string com
SQL>
- connecting to the new PDB
SQL> conn pdb1admin/welcome@test.com:1521/pdb1.com
Connected.
SQL> show con_name
CON_NAME
------------------------------
PDB1
SQL> conn pdb1admin/welcome@test.com/pdb1.com
Connected.
- tnsnames.ora on the server
SQL> conn pdb1admin/welcome@pdb1
Connected.
SQL> show con_name
CON_NAME
------------------------------
PDB1
- sqlDeveloper on the client
- tnsnames.ora on the client
add new information on the tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle88)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.com)
)
)
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle88)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb.com)
)
)
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle88)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1.com)
)
)
'Database > Oracle' 카테고리의 다른 글
48 - [Oracle 19C] Dropping PDB using SQL (0) | 2023.11.27 |
---|---|
47 - [Oracle 19C] To create PDB from seed PBD(DBCA) (0) | 2023.11.27 |
45 - [Oracle 19C] To create PDB from seed PBD (0) | 2023.11.24 |
44 - [Oracle 19C] V$SPPARAMETER (0) | 2023.11.24 |
43 - [Oracle 19C] Enable DDL logging (0) | 2023.11.24 |