oracle 12C的新特性-CDB和PDB
程序员文章站
2024-03-14 13:51:28
...
容器管理
连接数据库
[[email protected] ~]$ sqlplus / as sysdba
查询该容器是CDB 还是非CDB
SQL> select name,cdb,open_mode,con_id from v$database;
NAME CDB
OPEN_MODE CON_ID
ORCL YES
READ WRITE
查看当前容器
SQL> show con_name;
CON_NAME
CDB$ROOT
查看所创建的PDB
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
2 PDB$SEED READ ONLY NO
3 ORCLPDB READ WRITE NO
创建一个新PDB
SQL> create pluggable database pdb1 admin user pdb1 identified by pdb1 file_name_convert=(’/home/oracle/oracle/oradata/orcl/pdbseed/’,’/home/oracle/oracle/oradata/orcl/pdb1/’);
Pluggable database created.(插接式数据库已创建。)
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
2 PDB$SEED READ ONLY NO
3 PDBORCL
推荐阅读