【kingsql分享】Oracle 18c可插拔資料庫艦隊新玩法
1.設定CDB艦隊隊長
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
ORCLCDB
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
SQL> select file_name from cdb_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/system01.dbf
/opt/oracle/oradata/ORCLCDB/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/users01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/system01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/users01.dbf
SQL> ALTER DATABASE SET lead_cdb = TRUE;
Database altered.
SQL> GRANT sysoper,sysdba to system container=all;
Grant succeeded.
2.設定CDB艦隊成員
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
kingdb
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB2 READ WRITE NO
SQL> CREATE PUBLIC DATABASE LINK l_orclcdb CONNECT TO system IDENTIFIED BY oracle USING 'ORCLCDB';
Database link created.
SQL> ALTER DATABASE SET lead_cdb_uri='dblink:l_orclcdb';
3.從CDB艦隊隊長來檢視資料庫艦隊
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
ORCLCDB
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
5 PDB2 MOUNTED
4.CDB艦隊成員進行增加PDB操作
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
kingdb
SQL> create pluggable database pdb_mem1 admin user kingsql identified by oracle
2 file_name_convert =('/opt/oracle/oradata/KINGDB/pdbseed','/opt/oracle/oradata/KINGDB/pdb_mem1');
Pluggable database created.
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB2 READ WRITE NO
4 PDB_MEM1 MOUNTED
SQL> alter pluggable database pdb_mem1 open;
Pluggable database altered.
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB2 READ WRITE NO
4 PDB_MEM1 READ WRITE NO
5.檢視CDB艦隊隊長資訊
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
ORCLCDB
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
5 PDB2 MOUNTED
6 PDB_MEM1 MOUNTED
6.檢視CDB艦隊隊長的資料檔案資訊
SQL> select file_name from cdb_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/ORCLCDB/system01.dbf
/opt/oracle/oradata/ORCLCDB/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/users01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/system01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/sysaux01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/undotbs01.dbf
/opt/oracle/oradata/ORCLCDB/ORCLPDB1/users01.dbf
8 rows selected.
可見,CDB艦隊成員資訊只是邏輯的註冊過來
轉載請註明出處
hongzhuohui@qq.com
本來好幾年沒有更新部落格了,最近我的學生們都在勤勞的寫部落格,所以帶動了我。。
--------------------------------------------------------------------------------------------------------------
我曾發現有寫網站直接複製貼上,連圖片都能複製,請把作者也加上謝謝O(∩_∩)O
--------------------------------------------------------------------------------------------------------------
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28389881/viewspace-2222159/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【kingsql分享】OEL7.6安裝Oracle18c RPM新玩法SQLOracle
- 【kingsql分享】Oracle 18c RAC補丁升級實戰【DBRU】SQLOracle
- Oracle Database 12c可插拔資料庫案例OracleDatabase資料庫
- 【12C】Oracle 12C 新特性“可插拔資料庫”功能體驗Oracle資料庫
- oracle12c新特點之可插拔資料庫(Pluggable Database,PDB)Oracle資料庫Database
- 詳談Oracle12c新特點容器資料庫&可插拔資料庫(CDB&PDB)Oracle資料庫
- kettl連線oracle12c 可插拔資料庫pdbOracle資料庫
- Oracle 18c新特性:多租戶艦隊 CDB FleetOracle
- 【kingsql分享】使用BBED修改Oracle資料檔案頭推進SCNSQLOracle
- 【12C】Oracle 12c 可插拔資料庫之資料泵功能體驗Oracle資料庫
- Oracle12c中多宿主容器資料庫(CDBs)和可插拔資料庫(PDBs)新特性之執行指令碼Oracle資料庫指令碼
- Oracle12cr1新特性之容器資料庫(CDB)和可插拔資料庫(PDB) 的啟動和關閉Oracle資料庫
- 【kingsql分享】邏輯資料庫結構 之 資料塊SQL資料庫
- 【kingsql分享】Oracle Database 19c的各種新特性介紹SQLOracleDatabase
- 【kingsql分享】Oracle Database 20c 十大新特性介紹SQLOracleDatabase
- 【BUILD_ORACLE】在Oracle cloud資料庫“插拔”PDB的方法UIOracleCloud資料庫
- 關於oracle 12c多租戶可插拔資料庫的啟停分析(一)Oracle資料庫
- 百分點大資料技術團隊:可插拔OSS架構設計和實戰經驗大資料架構
- Oracle12c中配置例項引數和修改容器資料庫(CDB)及可插拔資料庫(PDB)Oracle資料庫
- 【kingsql分享】RHEL7.0安裝Oracle12cSQLOracle
- 【kingsql分享】深入研究Oracle物化檢視 之 保證資料一致的奧祕SQLOracle
- R12c 新特性:RMAN 可插拔資料庫的備份和恢復 (文件 ID 1945849.1)資料庫
- 多租戶:防止意外建立可插拔資料庫(PDB)- Lone-PDB資料庫
- Oracle 18cOracle
- 【kingsql分享】將RAC資料庫異機恢復到單例項(Ⅰ)SQL資料庫單例
- 【kingsql分享】表空間加密SQL加密
- 【kingsql分享】RAC節點命令SQL
- ORACLE 18C 19C 20C新特性Oracle
- Oracle 18c新特性詳解:In-Memory 專題Oracle
- Oracle 18C新特性之PDB snapshot(快照) CarouselOracle
- 單隊玩法擴充套件多隊套件
- 【kingsql分享】ASH的研究和分析SQL
- 【kingsql分享】關於PGA的研究SQL
- Oracle 18c新特性詳解-多租戶專題Oracle
- ORACLE 18C啟動資料庫報錯ORA-04031Oracle資料庫
- Spring如何實現可插拔配置?Spring
- 資料預測“加成”,解鎖“預測未來”新玩法!
- 【kingsql分享】ADDM的研究和分析SQL