【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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 18c新特性:多租戶艦隊 CDB FleetOracle
- 【kingsql分享】OEL7.6安裝Oracle18c RPM新玩法SQLOracle
- 【kingsql分享】Oracle 18c RAC補丁升級實戰【DBRU】SQLOracle
- kettl連線oracle12c 可插拔資料庫pdbOracle資料庫
- 【BUILD_ORACLE】在Oracle cloud資料庫“插拔”PDB的方法UIOracleCloud資料庫
- 【kingsql分享】使用BBED修改Oracle資料檔案頭推進SCNSQLOracle
- 【kingsql分享】Oracle Database 19c的各種新特性介紹SQLOracleDatabase
- 【kingsql分享】Oracle Database 20c 十大新特性介紹SQLOracleDatabase
- ORACLE 18C啟動資料庫報錯ORA-04031Oracle資料庫
- Oracle 資料庫安全許可權配置標準Oracle資料庫
- Oracle 18cOracle
- 百分點大資料技術團隊:可插拔OSS架構設計和實戰經驗大資料架構
- Oracle 18C新特性之PDB snapshot(快照) CarouselOracle
- 【kingsql分享】Oracle18c RAC ADVM卷OFFLINE修復一例SQLOracle
- 銀行大資料新玩法,構建“一湖兩庫”金融資料湖大資料
- ORACLE 18C 19C 20C新特性Oracle
- Oracle 18c新特性詳解:In-Memory 專題Oracle
- 「Oracle」Oracle 資料庫安裝Oracle資料庫
- 艦隊統帥
- Oracle資料庫配置Oracle資料庫
- Oracle 18c新特性詳解-多租戶專題Oracle
- oracle資料庫與oracle例項Oracle資料庫
- 「Oracle」Oracle 資料庫基本概念Oracle資料庫
- 「Oracle」Oracle資料庫基本概念Oracle資料庫
- Oracle資料庫-----資料庫的基本概念Oracle資料庫
- oracle 備份資料庫,匯出資料庫Oracle資料庫
- Spring如何實現可插拔配置?Spring
- 【kingsql分享】Linux平臺判斷大小端SQLLinux
- 【kingsql分享】Oracle跨版本遷移之XTTS_V4版本的實施SQLOracleTTS
- Oracle 12.2新特性: PDB級閃回資料庫(Flashback PDB)Oracle資料庫
- DataX將MySql資料庫資料同步到Oracle資料庫MySql資料庫Oracle
- ICDE 2022|Apache ShardingSphere:一個功能全面和可插拔的資料分片平臺Apache
- Oracle資料庫閃回Oracle資料庫
- oracle資料庫卡頓Oracle資料庫
- 4.2. Oracle資料庫Oracle資料庫
- Laravel 使用 Oracle 資料庫LaravelOracle資料庫
- sqlserver讀取oracle資料庫資料SQLServerOracle資料庫
- oracle資料庫資料字典應用Oracle資料庫