Pluggable Databases
(PDBs) is new in Oracle Database 12c Release 1 (12.1). You can have many
pluggable databases inside a single Oracle Database occurrence. Pluggable Databases
are fully backwards compatible with an ordinary pre-12.1 database.
Here this is example basic CDB / PDB Operations
How do I know if my database is Container Database or Non
Container database ?
SQL> select NAME,
DECODE(CDB, 'YES', 'CONTAINER DATABASE', 'NON CONTAINER DATABASE')
"Container DB ?" , OPEN_MODE, CON_ID from V$DATABASE;
NAME Container
DB
?
OPEN_MODE
CON_ID
--------- ------------------------ -------------------- ----------
CDB2 CONTAINER DATABASE MOUNTED 0
--------- ------------------------ -------------------- ----------
CDB2 CONTAINER DATABASE MOUNTED 0
SQL> select
CON_ID, NAME, OPEN_MODE from V$PDBS;
CON_ID
NAME OPEN_MODE
---------- ------------------------ ------------
2 PDB$SEED READ ONLY
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 PDB3 MOUNTED
6 PDB4 MOUNTED
7 PDB5 MOUNTED
8 PDB6 MOUNTED
9 PDB7 MOUNTED
...
---------- ------------------------ ------------
2 PDB$SEED READ ONLY
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 PDB3 MOUNTED
6 PDB4 MOUNTED
7 PDB5 MOUNTED
8 PDB6 MOUNTED
9 PDB7 MOUNTED
...
SQL> alter session
set container = pdb5;
SQL> ALTER SESSION
SET CONTAINER = CDB$ROOT;
SQL> show con_name
CON_NAME
------------------------------
PDB5
------------------------------
PDB5
Enjoy Oracle Database 12C !!!
Chatchai
ไม่มีความคิดเห็น:
แสดงความคิดเห็น