ORACLE RAC+DG調整redo大小
ORACLE RAC+DG調整redo大小
由於資料庫還沒有正式上生產,資料量很小,本案例先調整RAC主庫Redo,主庫調整完成後重建dg備庫;
一:調整redo log file
(1) 建立臨時日誌組,5,6,7,8;
(2) 切換當前日誌組到新建的臨時日誌組;
(3) 刪除原日誌組1,2,3,4;
(4) 建立新日誌組1,2,3,4,同時調大redo大小;
(5) 切換當前日誌組到新建的日誌組;
(6) 刪除臨時日誌組,5,6,7,8;
二:調整standby log file
(1)停止備庫例項;
(2)刪除原standby log file日誌組;
(3)建立新日誌組,同時調大redo大小;
三:重建立standby備庫
(1)刪除備庫資料檔案,日誌檔案,控制檔案等;
(2)重建standby備庫
四:校驗主、備庫資料是同步
五:常見問題
一:調整redo log file
檢視主庫online redo資訊。
select a.members,
a.thread#,
a.status,
a.bytes / 1024 / 1024,
b.type,
b.member,
b.group#
from v$log a, v$logfile b
where a.group# = b.group#;
(1) 建立臨時日誌組,5,6,7,8;
alter database add logfile thread 1 group 5 ('+DATA/ncdb/onlinelog/redo05a.log','+FRA/ncdb/onlinelog/redo05b.log') size 100M;
alter database add logfile thread 1 group 6 ('+DATA/ncdb/onlinelog/redo06a.log','+FRA/ncdb/onlinelog/redo06b.log') size 100M;
alter database add logfile thread 2 group 7 ('+DATA/ncdb/onlinelog/redo07a.log','+FRA/ncdb/onlinelog/redo07b.log') size 100M;
alter database add logfile thread 2 group 8 ('+DATA/ncdb/onlinelog/redo08a.log','+FRA/ncdb/onlinelog/redo08b.log') size 100M;
(2) 切換當前日誌組到新建的臨時日誌組;
alter system switch logfile; ---切換當前日誌組
alter system checkpoint; ---將ACTIVE切換到INACTIVE
(3) 刪除原日誌組1,2,3,4;
alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;
alter database drop logfile group 4;
(4) 建立新日誌組1,2,3,4,同時調大redo大小;
alter database add logfile thread 1 group 1 ('+DATA/ncdb/onlinelog/redo01a.log','+FRA/ncdb/onlinelog/redo01b.log') size 100M;
alter database add logfile thread 1 group 2 ('+DATA/ncdb/onlinelog/redo02a.log','+FRA/ncdb/onlinelog/redo02b.log') size 100M;
alter database add logfile thread 2 group 3 ('+DATA/ncdb/onlinelog/redo03a.log','+FRA/ncdb/onlinelog/redo03b.log') size 100M;
alter database add logfile thread 2 group 4 ('+DATA/ncdb/onlinelog/redo04a.log','+FRA/ncdb/onlinelog/redo04b.log') size 100M;
(5) 切換當前日誌組到新建的日誌組;
alter system switch logfile; ---切換當前日誌組
alter system checkpoint; ---將ACTIVE切換到INACTIVE
(6) 刪除臨時日誌組,5,6,7,8;
alter database drop logfile group 5;
alter database drop logfile group 6;
alter database drop logfile group 7;
alter database drop logfile group 8;
二:調整standby log file
檢視standby log file資訊
select a.member,
a.thread#,
a.status,
b.bytes / 1024 / 1024,
b.group#,
b.used / 1024 / 1024,
b.status
from v$logfile a, v$standby_log b
where a.group# = b.group#;
(1)停止備庫例項;
(2)刪除原standby log file日誌組;
alter database drop standby logfile group 11;
alter database drop standby logfile group 12;
alter database drop standby logfile group 13;
alter database drop standby logfile group 14;
alter database drop standby logfile group 15;
alter database drop standby logfile group 16;
alter database drop standby logfile group 17;
alter database drop standby logfile group 18;
alter database drop standby logfile group 19;
alter database drop standby logfile group 20;
(3)建立新日誌組,同時調大redo大小;
alter database add standby logfile thread 1 group 11 '+DATA/ncdb/onlinelog/standby_redo11.log' size 100m;
alter database add standby logfile thread 1 group 12 '+DATA/ncdb/onlinelog/standby_redo12.log' size 100m;
alter database add standby logfile thread 1 group 13 '+DATA/ncdb/onlinelog/standby_redo13.log' size 100m;
alter database add standby logfile thread 1 group 14 '+DATA/ncdb/onlinelog/standby_redo14.log' size 100m;
alter database add standby logfile thread 1 group 15 '+DATA/ncdb/onlinelog/standby_redo15.log' size 100m;
alter database add standby logfile thread 2 group 16 '+DATA/ncdb/onlinelog/standby_redo16.log' size 100m;
alter database add standby logfile thread 2 group 17 '+DATA/ncdb/onlinelog/standby_redo17.log' size 100m;
alter database add standby logfile thread 2 group 18 '+DATA/ncdb/onlinelog/standby_redo18.log' size 100m;
alter database add standby logfile thread 2 group 19 '+DATA/ncdb/onlinelog/standby_redo19.log' size 100m;
alter database add standby logfile thread 2 group 20 '+DATA/ncdb/onlinelog/standby_redo20.log' size 100m;
三:重建立standby備庫
(1)刪除備庫資料檔案,日誌檔案,控制檔案等;
(2)重建standby備庫
[oracle@rac1 ~]$ rman target / auxiliary sys/oracle@standby
RMAN> duplicate target database for standby from active database dorecover;
四:校驗主、備庫資料是同步
---啟動備庫
SQL> alter database open;
---啟動mgr
SQL> alter database recover managed standby database disconnect from session;
---啟動實時應用
SQL> recover managed standby database cancel;
SQL> recover managed standby database using current logfile disconnect from session;
---主庫rac1建立測試資料
create tablespace test datafile '+DATA/ncdb/datafile/test01.dbf' size 10M;
create user test identified by a default tablespace test;
grant connect,resource,dba to test;
create table test.t1 as select level as id from dual connect by level <=10;
---主庫rac1,rac2,備庫standby檢視資料是否同步;
select * from test.t1;
五:常見問題
如果不取樣重建備庫的方式,直接在備庫新增或刪除日誌組可能會遇到如下問題:
(1)ORA-01156:進行中的恢復或閃回可能需要訪問檔案
alter database recover managed standby database cancel;
(2)ORA-01275:自動進行備用檔案管理時,不允許進行ADD LOGFILE操作
alter system set standby_file_management=manual;
(3)ORA-01624,ORA-00312:
alter database clear logfile group xxx;
alter database drop logfile group xxx;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2152256/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC+DG 調整redo/standby log fileOracle
- oracle 線上調整redoOracle
- 調整innodb redo log files數目和大小的具體方法和步驟
- 如何調整Pycharm字型大小PyCharm
- launchpad圖示大小怎麼調整?mac圖示調整大小方法介紹Mac
- Linux系統調整swap大小Linux
- wps批量調整圖片大小
- Oracle RAC+DG搭建Oracle
- oracle rac+adg調整redo日誌組導致adg備庫ogg抽取程式abendOracle
- 如何調整Docker裡面的Image 大小?Docker
- JavaScript滑鼠拖動調整div大小JavaScript
- Python 調整PDF頁面尺寸大小Python
- 【REDO】Oracle redo advice-sqlOracle RedoSQL
- 【REDO】Oracle redo undo 學習Oracle Redo
- 禪道檔案大小限制-nginx 調整Nginx
- Fast Resize for Mac(圖片大小調整工具)ASTMac
- Nginx 調整檔案上傳大小限制Nginx
- 圖片大小調整工具:Image Resizer for MacMac
- 調整Caps Lock和Shift大小寫控制
- Oracle Redo and UndoOracle Redo
- 【REDO】Oracle redo內部結構Oracle Redo
- ORACLE19C RAC+DGOracle
- win10畫板調整大小為A4怎麼設定_win10畫板如何調整大小Win10
- Chopping Block for Mac 圖示大小調整軟體BloCMac
- 批量調整視訊尺寸大小的方法,一鍵自動批量調整視訊
- 【TUNE_ORACLE】Oracle檢查點(四)檢查點對redo日誌的影響和redo日誌大小設定建議Oracle
- Oracle redo解析之-1、oracle redo log結構計算Oracle Redo
- kindeditor 上傳圖片 自動調整尺寸大小
- MAC新手教程:如何快速調整Dock欄的大小Mac
- centos7重新調整分割槽大小CentOS
- Mac 使用心得,調整MacOS的游標大小Mac
- win10如何調整開始欄大小_win10開始欄怎麼調整Win10
- Oracle RAC+DG 表空間擴容Oracle
- oracle的redo和undoOracle
- 為什麼資料庫調整大小如此困難?資料庫
- win10工作列預覽視窗大小如何調整_win10工作列縮圖預覽視窗大小的調整方法Win10
- 如何調整畫布內容並獲得調整大小(壓縮)的影像Base64資料?
- win10圖示間距大小怎麼調整_win10如何調整圖示間距Win10