Oracle 12c 多租戶在 CDB 中 Plug A PDB,Unplugging A PDB
Oracle 資料庫 12 c 中介紹了多租戶選項允許單個容器資料庫 (CDB) 來承載多個單獨的可插拔資料庫 (PDB)。
本文簡單的演示瞭如何在 CDB 中 Plug A PDB,Unplugging A PDB 操作。
一、 plugged PDB into Unplugged PDB
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 READ WRITE NO
SQL>alter pluggable database pdb01 close immediate;
SQL>alter pluggable database pdb01 unplug into '/home/oracle/pdb01.xml';
[oracle@12c01 ~]$ pwd
/home/oracle
[oracle@12c01 ~]$ ll pdb01.xml
-rw-r--r--. 1 oracle oinstall 7758 May 7 05:09 pdb01.xml
[oracle@12c01 ~]$ cat pdb01.xml
<?xml version="1.0" encoding="UTF-8"?>
<PDB>
<xmlversion>1</xmlversion>
<pdbname>PDB01</pdbname>
<cid>3</cid>
<byteorder>1</byteorder>
<vsn>203424000</vsn>
<vsns>
<vsnnum>12.2.0.1.0</vsnnum>
<cdbcompt>12.2.0.0.0</cdbcompt>
<pdbcompt>12.2.0.0.0</pdbcompt>
<vsnlibnum>0.0.0.0.24</vsnlibnum>
<vsnsql>24</vsnsql>
<vsnbsv>8.0.0.0.0</vsnbsv>
</vsns>
<dbid>2550500229</dbid>
...省略
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 MOUNTED
SQL> drop pluggable database pdb01 keep datafiles;
Pluggable database dropped.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
二、 Plug Unplugged PDB into CDB
SQL> SELECT NAME,CDB FROM V$DATABASE;
NAME CDB
--------- ---
ANDYCDB YES
SQL> create pluggable database pdb01 using '/home/oracle/pdb01.xml';
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 MOUNTED
SQL> alter pluggable database pdb01 open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 READ WRITE NO
本文簡單的演示瞭如何在 CDB 中 Plug A PDB,Unplugging A PDB 操作。
一、 plugged PDB into Unplugged PDB
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 READ WRITE NO
SQL>alter pluggable database pdb01 close immediate;
SQL>alter pluggable database pdb01 unplug into '/home/oracle/pdb01.xml';
[oracle@12c01 ~]$ pwd
/home/oracle
[oracle@12c01 ~]$ ll pdb01.xml
-rw-r--r--. 1 oracle oinstall 7758 May 7 05:09 pdb01.xml
[oracle@12c01 ~]$ cat pdb01.xml
<?xml version="1.0" encoding="UTF-8"?>
<PDB>
<xmlversion>1</xmlversion>
<pdbname>PDB01</pdbname>
<cid>3</cid>
<byteorder>1</byteorder>
<vsn>203424000</vsn>
<vsns>
<vsnnum>12.2.0.1.0</vsnnum>
<cdbcompt>12.2.0.0.0</cdbcompt>
<pdbcompt>12.2.0.0.0</pdbcompt>
<vsnlibnum>0.0.0.0.24</vsnlibnum>
<vsnsql>24</vsnsql>
<vsnbsv>8.0.0.0.0</vsnbsv>
</vsns>
<dbid>2550500229</dbid>
...省略
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 MOUNTED
SQL> drop pluggable database pdb01 keep datafiles;
Pluggable database dropped.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
二、 Plug Unplugged PDB into CDB
SQL> SELECT NAME,CDB FROM V$DATABASE;
NAME CDB
--------- ---
ANDYCDB YES
SQL> create pluggable database pdb01 using '/home/oracle/pdb01.xml';
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 MOUNTED
SQL> alter pluggable database pdb01 open;
Pluggable database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB01 READ WRITE NO
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31383567/viewspace-2138819/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12c 多租戶 CDB 與 PDB 備份Oracle
- Oracle 12c 多租戶配置和修改 CDB 和 PDB 引數Oracle
- 多租戶:在Oracle12.2中 從Non-CDB遷移到PDB,從PDB遷移另一個CDB中Oracle
- Oracle 12c 多租戶 手工建立 pdb 與 手工刪除 pdbOracle
- Oracle12c多租戶如何連線到CDB或PDB、CDB與PDB容器切換Oracle
- 12C多租戶關於CDB、PDB的常用SQL語句SQL
- Oracle 12c 多租戶 CDB 與 PDB之 shared undo 與 Local undo 切換Oracle
- Oracle12c多租戶如何啟動關閉CDB或PDB (PDB自動啟動)Oracle
- Oracle 12c 多租戶 CDB 與 PDB 級別 expdb 與 impdb(表、使用者、全庫)Oracle
- Oracle 12C RMAN transport tablespace from PDB of RAC CDB to remote PDBOracleREM
- Oracle12c多租戶CDB 與 PDB 引數檔案位置探討、查詢 CDB 與 PDB 不同值的引數Oracle
- oracle 12c 多租戶 pdb 恢復(單個pdb資料檔案、非系統pdb表空間、整個pdb資料庫)Oracle資料庫
- ORACLE 12C新特性——CDB與PDBOracle
- Oracle12c多租戶資料庫 - PDB資料庫的unplug及plug 2Oracle資料庫
- Oracle12c多租戶資料庫 - PDB資料庫的unplug及plug 1Oracle資料庫
- Oracle12c多租戶資料庫 - PDB資料庫的unplug及plug 3Oracle資料庫
- oracle 12c PDB隨CDB啟動和連結PDB的方式Oracle
- Oracle 12c多租戶特性詳解:PDB 的建立、克隆與維護Oracle
- Oracle 12c多租戶特性詳解:PDB 的出與入 InAndOutOracleNaN
- Oracle 12c多租戶特性詳解:PDB 的備份與恢復Oracle
- Oracle 12C RMAN Duplicating the PDB to remote CDBOracleREM
- Oracle 12c CDB&PDB 基本維護Oracle
- Oracle12c多租戶資料庫 - PDB資料庫的unplug及plug 參考Oracle資料庫
- Part III PDB建立概述-Oracle多租戶管理員指南Oracle
- 【CDB】Oracle CDB/PDB常用管理命令Oracle
- 多租戶:防止意外建立可插拔資料庫(PDB)- Lone-PDB資料庫
- Oracle 12c 使用Non-CDB來建立PDBOracle
- Oracle 12c 多租戶專題|12cR2中PDB記憶體資源管理Oracle記憶體
- Oracle 12C 中CDB和PDB的引數檔案管理Oracle
- pdb的plug、unplug、drop---oracle 12c 學習(2)Oracle
- 【ASK_ORACLE】Oracle 12c之CDB與PDB的備份與恢復(一)什麼是CDB與PDB?Oracle
- 12c RAC 和 CDB/PDB 學習
- Oracle CDB和PDB基本管理Oracle
- 【BAK_ORACLE】Oracle 12c之CDB與PDB的備份與恢復(三)CDB與PDB的備份方式Oracle
- oracle 12c中CDB和PDB的備份還原實驗Oracle
- Oracle 12c系列(七) | Non-CDB轉換為PDBOracle
- Oracle 12C -- 使用seed PDB建立新的pdbOracle
- Oracle 12c Relocate PDBOracle