oracle12c的CDB和PDB初探
[oracle@oracle12cs ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 22 15:49:41 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> show con_name;
CON_NAME
------------------------------
CDB$ROOT
SQL> alter session set container=pdbndc; --進入PDB
Session altered.
SQL> show con_name;
CON_NAME
------------------------------
PDBNDC
[oracle@oracle12cs ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 22 15:53:44 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
with the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select name,cdb from v$database;
NAME CDB
--------- ---
NDC YES
SQL> select pdb_id,pdb_name,dbid,status,create_scn from dba_pdbs;
PDB_ID PDB_NAME DBID STATUS CREATION_SCN
---------- -------------------- ---------- --------- ------------
3 PDBNDC 4056045727 NORMAL 1740000
2 PDB$SEED 3164418748 NORMAL 1594403
4 PDB2 2424970819 NEW 1746754
PDB_ID PDB_NAME DBID STATUS CREATION_SCN
---------- -------------------- ---------- --------- ------------
3 PDBNDC 4056045727 NORMAL 1740000
2 PDB$SEED 3164418748 NORMAL 1594403
--1直接建立
CREATE PLUGGABLE DATABASE pdb2
ADMIN USER pdb2_admin IDENTIFIED BY oracle
STORAGE (MAXSIZE 2G MAX_SHARED_TEMP_SIZE 100M)
DEFAULT TABLESPACE tbs_pdb2 DATAFILE '/u01/app/oracle/oradata/NDC/datafile/pdb2_001.dbf' SIZE 25M AUTOEXTEND ON;
--2 按照模板建立PDB
SQL> alter pluggable database pdbndc close;
alter pluggable database pdbndc close
*
ERROR at line 1:
ORA-65020: pluggable database PDBNDC already closed
SQL> alter pluggable database pdbndc open read only;
Pluggable database altered.
SQL> create pluggable database pdb2
2 from pdbndc
3 file_name_convert=('/u01/app/oracle/oradata/NDC/35D8EADBC36F2F56E0539B00A8C098CD/datafile/','/u01/app/oracle/oradata/NDC/datafile/pdb2');
SQL> alter pluggable database pdb2 open;
Pluggable database altered.
SQL> alter pluggable database pdb2 close;
Pluggable database altered.
SQL> alter pluggable database pdb2 open;
Pluggable database altered.
SQL> alter pluggable database all close;
Pluggable database altered.
SQL> alter pluggable database all open;
Pluggable database altered.
SQL> alter pluggable database pdb2 close immediate;
Pluggable database altered.
SQL> alter pluggable database all open;
Pluggable database altered.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDBNDC READ WRITE
PDB2 READ WRITE
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/543979/viewspace-2120722/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle12c多租戶如何連線到CDB或PDB、CDB與PDB容器切換Oracle
- Oracle CDB和PDB基本管理Oracle
- Oracle12c多租戶CDB 與 PDB 引數檔案位置探討、查詢 CDB 與 PDB 不同值的引數Oracle
- Oracle12c多租戶如何啟動關閉CDB或PDB (PDB自動啟動)Oracle
- 【CDB】Oracle CDB/PDB常用管理命令Oracle
- oracle 12c PDB隨CDB啟動和連結PDB的方式Oracle
- 12c RAC 和 CDB/PDB 學習
- 2.6.2 Overview of Flashback PDB in a CDBView
- CDB與PDB的系統關係
- Oracle12c中配置例項引數和修改容器資料庫(CDB)及可插拔資料庫(PDB)Oracle資料庫
- 1.3.2.2.2 通過Non-CDB(非CDB模式)建立PDB模式
- 4.3.2.2 關於CDB Root和PDB$SEED檔案的名稱和位置
- 1.3.2.2.2. 通過Non-CDB(非CDB模式)建立PDB模式
- 詳談Oracle12c新特點容器資料庫&可插拔資料庫(CDB&PDB)Oracle資料庫
- Oracle12c中多宿主環境(CDB&PDB)的資料庫觸發器(Database Trigger)Oracle資料庫觸發器Database
- 12C關於CDB、PDB建立AWR的方法和總結
- Oracle 12C 中CDB和PDB的引數檔案管理Oracle
- oracle 19c CDB vs pdb 建立Oracle
- Oracle 12C RMAN transport tablespace from PDB of RAC CDB to remote PDBOracleREM
- Oracle12c日常pdb建立、開關和刪除操作Oracle
- 【BAK_ORACLE】Oracle 12c之CDB與PDB的備份與恢復(三)CDB與PDB的備份方式Oracle
- 12C關於CDB、PDB引數的區別和總結
- oracle 12c中CDB和PDB的備份還原實驗Oracle
- 【ASK_ORACLE】Oracle 12c之CDB與PDB的備份與恢復(一)什麼是CDB與PDB?Oracle
- Oracle 12c 多租戶配置和修改 CDB 和 PDB 引數Oracle
- 【CDB】怎樣修改PDB的記憶體引數記憶體
- ORACLE 12C新特性——CDB與PDBOracle
- Oracle 12C RMAN Duplicating the PDB to remote CDBOracleREM
- Oracle 12c CDB&PDB 基本維護Oracle
- Oracle 12c 多租戶在 CDB 中 Plug A PDB,Unplugging A PDBOracle
- 多租戶:在Oracle12.2中 從Non-CDB遷移到PDB,從PDB遷移另一個CDB中Oracle
- 將一個非CDB資料庫以PDB形式裝入一個CDB中資料庫
- CDB和PDB關於使用者建立和使用者許可權區別
- 12C把non-CDB的單庫匯入到CDB裡面當成PDB的方法
- Oracle 12c 使用Non-CDB來建立PDBOracle
- oracle12c CDB中共同使用者和本地使用者區別Oracle
- Oracle 12c 多租戶 CDB 與 PDB 備份Oracle
- Oracle12c 針對單個pdb的全備與恢復Oracle