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調整redo log日誌大小Oracle
- oracle 線上調整redoOracle
- 【操作】調整Online Redo Logs大小(Resizing Oracle Online Redo Logs)Oracle
- Oracle11g調整redo日誌大小、組數和每組成員數Oracle
- 修改oracle redo log的大小Oracle Redo
- 如何調整Pycharm字型大小PyCharm
- sga_target大小調整
- 深入講解調整Oracle SGA大小的解決方法Oracle
- Excel如何調整圖片大小Excel
- launchpad圖示大小怎麼調整?mac圖示調整大小方法介紹Mac
- Linux系統調整swap大小Linux
- 如何調整Docker裡面的Image 大小?Docker
- wps批量調整圖片大小
- JavaScript滑鼠拖動調整div大小JavaScript
- oracle 效能調整Oracle
- 圖片大小調整工具:Image Resizer for MacMac
- Nginx 調整檔案上傳大小限制Nginx
- Fast Resize for Mac(圖片大小調整工具)ASTMac
- jQuery滑鼠拖動調整數字大小jQuery
- Python 調整PDF頁面尺寸大小Python
- 禪道檔案大小限制-nginx 調整Nginx
- Oracle DataGuard環境主備庫日誌組數和大小調整Oracle
- Oracle產生redo日誌量大小統計Oracle
- Oracle效能調整之--DML語句效能調整Oracle
- win10畫板調整大小為A4怎麼設定_win10畫板如何調整大小Win10
- oracle效能調整(1)Oracle
- oracle效能調整(2)Oracle
- ORACLE效能調整--1Oracle
- ORACLE效能調整---2Oracle
- Oracle 效能調整for HWOracle
- (zt)Oracle效能調整Oracle
- 調整oracle redologOracle Redo
- oracle效能調整2Oracle
- 批量調整視訊尺寸大小的方法,一鍵自動批量調整視訊
- Oracle效能最佳化調整--調整重做機制Oracle
- oracle 線上修改online redo logfiles size 大小Oracle
- Chopping Block for Mac 圖示大小調整軟體BloCMac