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的方法和總結
- 12C關於CDB、PDB引數的區別和總結
- 12C關於CDB、PDB 臨時temp表空間的總結
- 12C關於CDB、PDB 回滾undo表空間的總結
- 12C關於CDB、PDB的官方解釋
- sqlserver關於日誌傳輸log shipping的總結SQLServer
- Oracle 12C 中CDB和PDB的引數檔案管理Oracle
- MySQL重做日誌(redo log)MySql
- mysql關於二進位制日誌binary log的總結MySql
- 12C多租戶關於CDB、PDB的常用SQL語句SQL
- Oracle11g redo log 建立、新增、刪除(重做日誌組,重做日誌檔案)Oracle
- oracle 12c PDB隨CDB啟動和連結PDB的方式Oracle
- 4.3.2.2 關於CDB Root和PDB$SEED檔案的名稱和位置
- 【Mysql】三大日誌 redo log、bin log、undo logMySql
- 12C關於CDB、PDB線上移動資料檔案、線上重新命名資料檔案的操作說明
- 【12c cdb pdb】實驗
- MySQL 日誌系統 redo log、binlogMySql
- MySQL中Redo Log相關的重要引數總結MySql
- mysql日誌:redo log、binlog、undo log 區別與作用MySql
- 12c日誌檔案路徑
- linux 日誌log檔案 截斷Linux
- mysql關於redo事務日誌ib_logfile的理解MySql
- 必須瞭解的mysql三大日誌-binlog、redo log和undo logMySql
- redo log 和 binlog 的一些總結
- Android 關於 so 檔案的總結Android
- 【BAK_ORACLE】Oracle 12c之CDB與PDB的備份與恢復(三)CDB與PDB的備份方式Oracle
- 【ASK_ORACLE】Oracle 12c之CDB與PDB的備份與恢復(一)什麼是CDB與PDB?Oracle
- sqlserver關於filestream檔案流、filetable檔案表的總結SQLServer
- 【REDO】Oracle 日誌挖掘,分析歸檔日誌線上日誌主要步驟Oracle
- MySQL更新資料時,日誌(redo log、binlog)執行流程MySql
- 4.3.2.3 關於PDB$SEED資料檔案的屬性
- mysql關於db.opt檔案的總結MySql
- Linux中log檔案是什麼意思?Linux日誌檔案說明Linux
- Oracle 12c系列(七) | Non-CDB轉換為PDBOracle
- sql2008刪除log檔案和清空日誌的方法SQL
- log4j2定期刪除日誌檔案的配置
- 日誌檔案使用小結(轉)
- 關於k8s叢集容器日誌收集的總結K8S