12C關於CDB、PDB 日誌檔案redo log的總結
以下結論皆經過實驗驗證,版本12.2,為方便理解,本文中CDB指的是根容器CDB$ROOT
1、CDB和所有PDB共享online redo log和archivelog
2、總的來說12C的體系結構中關於日誌檔案redo log和11G是一樣的,所以操作方法也和11G一樣。
3、只有CDB才能建立redo log group和redo log member
4、只有CDB才能啟用、禁用歸檔,也就是說CDB和PDB必須同時為歸檔或非歸檔模式
5、沒有alter pluggable database database_name archivelog這樣的語法
--PDB無法建立redo log group和redo log member
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> show parameter db_recovery_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u02/fra
SQL> select GROUP#,THREAD#,SEQUENCE#,MEMBERS,ARCHIVED,STATUS,CON_ID from v$log;
GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS CON_ID
---------- ---------- ---------- ---------- --- ---------- ----------
1 1 61 2 YES INACTIVE 0
2 1 62 2 NO CURRENT 0
3 1 60 2 YES INACTIVE 0
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_ CON_ID
---------- ---------- ------- -------------------------------------------------- --- ----------
3 ONLINE /u02/data/OCP/onlinelog/o1_mf_3_h0gsrdsb_.log NO 0
3 ONLINE /u02/fra/OCP/onlinelog/o1_mf_3_h0gsrfs8_.log YES 0
2 ONLINE /u02/data/OCP/onlinelog/o1_mf_2_h0gsqzby_.log NO 0
2 ONLINE /u02/fra/OCP/onlinelog/o1_mf_2_h0gsr1bw_.log YES 0
1 ONLINE /u02/data/OCP/onlinelog/o1_mf_1_h0gsqzbn_.log NO 0
1 ONLINE /u02/fra/OCP/onlinelog/o1_mf_1_h0gsr1bq_.log YES 0
SQL> alter database add logfile ('/u02/data/test/redo401.log','/u02/data/test/redo402.log') size 10M;
SQL> alter database add logfile member '/u02/data/test/redo301.log' to group 3;
SQL> select GROUP#,THREAD#,SEQUENCE#,MEMBERS,ARCHIVED,STATUS,CON_ID from v$log;
GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS CON_ID
---------- ---------- ---------- ---------- --- ---------- ----------
1 1 61 2 YES INACTIVE 0
2 1 62 2 NO CURRENT 0
3 1 60 3 YES INACTIVE 0
4 1 0 2 YES UNUSED 0
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_ CON_ID
---------- ---------- ------- -------------------------------------------------- --- ----------
3 ONLINE /u02/data/OCP/onlinelog/o1_mf_3_h0gsrdsb_.log NO 0
3 ONLINE /u02/fra/OCP/onlinelog/o1_mf_3_h0gsrfs8_.log YES 0
2 ONLINE /u02/data/OCP/onlinelog/o1_mf_2_h0gsqzby_.log NO 0
2 ONLINE /u02/fra/OCP/onlinelog/o1_mf_2_h0gsr1bw_.log YES 0
1 ONLINE /u02/data/OCP/onlinelog/o1_mf_1_h0gsqzbn_.log NO 0
1 ONLINE /u02/fra/OCP/onlinelog/o1_mf_1_h0gsr1bq_.log YES 0
4 ONLINE /u02/data/test/redo401.log NO 0
4 ONLINE /u02/data/test/redo402.log NO 0
3 INVALID ONLINE /u02/data/test/redo301.log NO 0
SQL> alter session set container=pocp999;
Session altered.
SQL> alter database add logfile ('/u02/data/test/redo501.log','/u02/data/test/redo502.log') size 10M;
alter database add logfile ('/u02/data/test/redo501.log','/u02/data/test/redo502.log') size 10M
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database
SQL> alter database add logfile member '/u02/data/test/redo302.log' to group 3;
alter database add logfile member '/u02/data/test/redo302.log' to group 3
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database
--PDB無法禁用歸檔
SQL> alter session set container=pocp999;
SQL> shutdown immediate;
Pluggable Database closed.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
5 POCP999 MOUNTED
SQL> alter database noarchivelog;
alter database noarchivelog
*
ERROR at line 1:
ORA-65040: operation not allowed from within a pluggable database
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2675350/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 12C關於CDB、PDB建立AWR的方法和總結
- 重做日誌(redo log)相關總結
- 12C關於CDB、PDB引數的區別和總結
- 12C關於CDB、PDB 臨時temp表空間的總結
- 12C關於CDB、PDB 回滾undo表空間的總結
- ASM的優點總結--關於日誌檔案調整ASM
- Oracle 12C 中CDB和PDB的引數檔案管理Oracle
- 【REDO】刪除REDO LOG重做日誌組後需要手工刪除對應的日誌檔案
- sqlserver關於日誌傳輸log shipping的總結SQLServer
- 12C多租戶關於CDB、PDB的常用SQL語句SQL
- 12C關於CDB、PDB線上移動資料檔案、線上重新命名資料檔案的操作說明
- 4.3.2.2 關於CDB Root和PDB$SEED檔案的名稱和位置
- 【REDO】重做日誌檔案(redo log files)管理(增,刪,改,查,切)
- oracle 12c PDB隨CDB啟動和連結PDB的方式Oracle
- oracle聯機日誌檔案REDO LOGFILE簡述Oracle
- mysql關於redo事務日誌ib_logfile的理解MySql
- oracle 關於-日誌檔案Oracle
- mysql關於二進位制日誌binary log的總結MySql
- MySQL重做日誌(redo log)MySql
- redo log日誌挖掘(二)
- redo log日誌挖掘(一)
- rsyslog日誌總結
- Oracle11g redo log 建立、新增、刪除(重做日誌組,重做日誌檔案)Oracle
- 關於HBase的日誌檔案和HFile
- 線上重建redo log日誌組
- SQL Server日誌檔案總結及日誌滿的處理SQLServer
- ORACLE 12C新特性——CDB與PDBOracle
- 12c RAC 和 CDB/PDB 學習
- MySQL 日誌系統 redo log、binlogMySql
- 關於redo log 檔案中記錄的內容問題 ?
- 【redo】日誌檔案的丟失解決方法
- Oracle 12C 新特性:關於歸檔日誌的備份Oracle
- Oracle 12C RMAN transport tablespace from PDB of RAC CDB to remote PDBOracleREM
- 關於控制檔案的總結
- archive log檔案大小與redo log檔案大小關係探究Hive
- 12c日誌檔案路徑
- online redo log 操作 -- 更改RAC資料庫日誌檔案大小資料庫
- [zt] SQL Server日誌檔案總結及日誌滿的處理SQLServer