Oracle搭建rac到單庫的adg
上海主庫rac的資料目錄全放在ASM下面
北京備庫的資料目錄存放在/data/uencordb/下面
主庫:
1、把密碼檔案拷貝過去
2、建立備庫控制檔案,拷貝到備庫
alter database create standby controlfile as '/home/oracle/stdctl.ctl';
3、把redo改成合適的大小和組數
4、建立standby redo log --主庫建立這個是為了轉換為備庫,不轉備庫的話沒必要建
alter system set standby_file_management='manual';
alter database add standby logfile thread 1 group 41 ('+DATA/uencordb/onlinelog/standby41.log') size 1g;
alter database add standby logfile thread 1 group 42 ('+DATA/uencordb/onlinelog/standby42.log') size 1g;
alter database add standby logfile thread 1 group 43 ('+DATA/uencordb/onlinelog/standby43.log') size 1g;
alter database add standby logfile thread 1 group 44 ('+DATA/uencordb/onlinelog/standby44.log') size 1g;
alter database add standby logfile thread 1 group 45 ('+DATA/uencordb/onlinelog/standby45.log') size 1g;
alter database add standby logfile thread 1 group 46 ('+DATA/uencordb/onlinelog/standby46.log') size 1g;
alter database add standby logfile thread 1 group 47 ('+DATA/uencordb/onlinelog/standby47.log') size 1g;
alter database add standby logfile thread 2 group 51 ('+DATA/uencordb/onlinelog/standby51.log') size 1g;
alter database add standby logfile thread 2 group 52 ('+DATA/uencordb/onlinelog/standby52.log') size 1g;
alter database add standby logfile thread 2 group 53 ('+DATA/uencordb/onlinelog/standby53.log') size 1g;
alter database add standby logfile thread 2 group 54 ('+DATA/uencordb/onlinelog/standby54.log') size 1g;
alter database add standby logfile thread 2 group 55 ('+DATA/uencordb/onlinelog/standby55.log') size 1g;
alter database add standby logfile thread 2 group 56 ('+DATA/uencordb/onlinelog/standby56.log') size 1g;
alter database add standby logfile thread 2 group 57 ('+DATA/uencordb/onlinelog/standby57.log') size 1g;
alter system set standby_file_management='auto';
5、修改主庫資料庫引數
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(uencordb,bjcordb)' scope=both sid='*';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=+ARCH VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=uencordb' scope=both sid='*';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='SERVICE=bjcordb LGWR ASYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=bjcordb' scope=both sid='*';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1=ENABLE scope=both sid='*';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE scope=both sid='*';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_3=ENABLE scope=both sid='*';
ALTER SYSTEM SET FAL_CLIENT = 'uencordb' scope=both sid='*';
ALTER SYSTEM SET FAL_SERVER ='bjcordb' scope=both sid='*';
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT =AUTO scope=both sid='*';
如果rac主庫要被切換為備庫的話,就配置下面的引數,需要重啟資料庫
SQL> alter system set db_file_name_convert ='/data/uencordb/','+DATA/uencordb/datafile/','/data/uencordb/','+DATA/uencordb/tempfile/' scope=spfile sid='*';
SQL> alter system set log_file_name_convert='/data/uencordb/','+DATA/uencordb/onlinelog/' scope=spfile sid='*';
6、配置北京備庫引數
*.audit_file_dest='/u01/app/oracle/admin/uencordb/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/data/uencordb/control01.ctl','/data/uencordb/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='uencordb'
*.db_unique_name='bjcordb'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=uencordbXDB)'
*.fal_client='bjcordb'
*.fal_server='uencordb'
*.log_archive_config='dg_config=(uencordb,bjcordb)'
*.log_archive_dest_1='LOCATION=/data/arch/coradg VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=bjcordb'
*.log_archive_dest_2='SERVICE=uencordb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=uencordb'
*.db_file_name_convert='+DATA/uencordb/datafile/','/data/uencordb/','+DATA/uencordb/tempfile/','/data/uencordb/'
*.log_file_name_convert='+DATA/uencordb/onlinelog/','/data/uencordb/'
*.standby_file_management='auto'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=16135487488
*.processes=5000
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=5505
*.sga_max_size=85899345920
*.sga_target=48407511040
*.undo_tablespace='UNDOTBS1'
7、配置靜態監聽:
主庫配置靜態監聽是為了配置dgbroker
主庫節點1
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME = uencordb_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = uencordb1)
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME = uencordb_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = uencordb2)
)
)
北京備庫
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME = uencordb_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/
dbhome_1)
(SID_NAME = uencordb)
)
)
8、配置好監聽後,主備互相驗證:
sqlplus sys/xxx@uencordb as sysdba
然後進去rman還原控制檔案:
restore controlfile from '/home/oracle/stdctl.ctl';
然後重新進來做dumplicate
[oracle@adg admin]$ rman target sys/xxx@uencordb auxiliary sys/xxx@bjcordb
RMAN> duplicate target database for standby from active database;
恢復好後,進去sql模式(當前是mount),開啟程式追下歸檔
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
等日誌追平後,再開到readonly
select thread#,sequence#, applied from v$archived_log order by 3 desc,2;
select THREAD#,max(SEQUENCE#) from v$archived_log group by THREAD#;
select process,status from v$managed_standby;
SQL> alter database recover managed standby database cancel;
SQL> ALTER DATABASE OPEN READ ONLY;
結束
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31098809/viewspace-2872490/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle rac+adg調整redo日誌組導致adg備庫ogg抽取程式abendOracle
- 單例項Primary快速搭建Standby RAC參考手冊(19.16 ADG)單例
- Oracle ADG 備庫新增備庫Oracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- Networker恢復oracle rac到單機Oracle
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- 【DG】MAA-RAC to RAC ADG配置
- Oracle 12c 使用RMAN搭建物理備庫(RAC to RAC)Oracle
- Oracle RAC+DG搭建Oracle
- openPower伺服器搭建Oracle 19c adg伺服器Oracle
- Oracle 11g RAC到單例項OGG同步Oracle單例
- ORACLE RAC TO RAC DG搭建過程中可能遇到的問題Oracle
- oracle rac資料庫的安裝Oracle資料庫
- oracle rac 11.2.0.3 升級到11.2.0.4Oracle
- Oracle 19c adg全庫遷移資料Oracle
- oracle adg備庫歸檔滿了無法同步Oracle
- 簡單介紹Oracle 19c RAC 手工建庫的過程Oracle
- oracle ADG與DG的區別Oracle
- RAC恢復到單機
- Oracle RAC+ADG新增資料檔案失敗處理(db_create_file_dest)Oracle
- 【DBA Part03】國產Linux上Oracle RAC安裝-升級-ADG-遷移LinuxOracle
- 搭建windows到linux的oracle 12c physical standby備庫WindowsLinuxOracle
- vgant 安裝oracle資料庫racOracle資料庫
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(四)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(五)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(三)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(二)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(一)Oracle
- oracle adg主庫通過rman無法刪除歸檔Oracle
- rac恢復到單例項單例
- 記錄一次Oracle 11.2.0.4 RAC異地恢復到單例項Oracle單例
- ORACLE 12C RAC資料庫的啟停Oracle資料庫
- jdbc連線oracle rac資料庫的寫法JDBCOracle資料庫
- oracle RACOracle
- Oracle資料庫(RAC)巡檢報告Oracle資料庫
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- Oracle 資料庫巡檢指令碼 單例項 RAC 輸出HTML格式Oracle資料庫指令碼單例HTML
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle