1.使用SQL DEVELOPER
2.使用語句
SQL> col pdb_name format A20
SQL> col status format A20
SQL> select pdb_name, status from cdb_pdbs;
創(chuàng)新互聯(lián)是專業(yè)的麗江網(wǎng)站建設公司,麗江接單;提供成都網(wǎng)站制作、網(wǎng)站建設,網(wǎng)頁設計,網(wǎng)站設計,建網(wǎng)站,PHP網(wǎng)站建設等專業(yè)做網(wǎng)站服務;采用PHP框架,可快速的進行麗江網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
PDB_NAME STATUS
PDBTEST NORMAL
PDB$SEED NORMAL
CLONEPDB NORMAL
SQL> alter pluggable database clonepdb close immediate;
SQL> alter pluggable database clonepdb unplug into 'C:\app\Administrator\virtual\product\12.2.0\dbhome_2\database\clonepdb.xml';
SQL> select pdb_name, status from cdb_pdbs;
PDB_NAME STATUS
-------------------- -------------------- PDBTEST NORMAL
PDB$SEED NORMAL
CLONEPDB UNPLUGGED
SQL> select pdb_name, status from cdb_pdbs;
PDB_NAME STATUS -------------------- --------------------
PDBTEST NORMAL
PDB$SEED NORMAL CLONEPDB UNPLUGGED
SQL> drop pluggable database clonepdb keep datafiles;
插接式數(shù)據(jù)庫已刪除。
SQL> select pdb_name, status from cdb_pdbs;
PDB_NAME STATUS
PDBTEST NORMAL
PDB$SEED NORMAL
C:\Users\Administrator>mkdir C:\app\Administrator\virtual\oradata\newtest\clonepdb_plug
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on 星期四 12月 14 15:47:00 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
連接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> create pluggable database clonepdb_plug using 'C:\app\Administrator\virtual\product\12.2.0\dbhome_2\database\clonepdb.xml' MOVE 2 FILE_NAME_CONVERT=('C:\app\Administrator\virtual\oradata\newtest\CLONEPDB','C:\app\Administrator\virtual\oradata\newtest\clonepdb_plug');
插接式數(shù)據(jù)庫已創(chuàng)建。
SQL> col status format A20
SQL> col pdb_name format A20
SQL> select pdb_name, status from cdb_pdbs;
PDB_NAME STATUS
PDBTEST NORMAL
PDB$SEED NORMAL
CLONEPDB_PLUG NEW
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
2 PDB$SEED READ ONLY NO
3 PDBTEST READ WRITE NO
4 CLONEPDB_PLUG MOUNTED
SQL> alter pluggable database CLONEPDB_PLUG open read write;
插接式數(shù)據(jù)庫已變更。
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
2 PDB$SEED READ ONLY NO
3 PDBTEST READ WRITE NO
4 CLONEPDB_PLUG READ WRITE NO SQL> select pdb_name, status from cdb_pdbs;
PDB_NAME STATUS
PDBTEST NORMAL
PDB$SEED NORMAL
CLONEPDB_PLUG NORMAL