溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

RAC-DG 安裝總結(jié)

發(fā)布時間:2020-07-01 07:51:23 來源:網(wǎng)絡(luò) 閱讀:351 作者:llc018198 欄目:關(guān)系型數(shù)據(jù)庫
  1. 配置好主庫參數(shù)文件:

添加:

*.log_archive_config='DG_CONFIG=(CWFOL,CWFOLB)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=CWFOL'
*.log_archive_dest_2='SERVICE=CWFOLB LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=CWFOLB'

重啟每個節(jié)點(diǎn):

2.為主庫添加standby log:

alter database add standby logfile thread 1('+DATA','+FRA') size 200M;
alter database add standby logfile thread 1('+DATA','+FRA') size 200M;
alter database add standby logfile thread 1('+DATA','+FRA') size 200M;
alter database add standby logfile thread 1('+DATA','+FRA') size 200M;
alter database add standby logfile thread 1('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;

3.配置靜態(tài)監(jiān)聽,,主庫和備庫,各節(jié)點(diǎn),,,

4.主庫開啟閃回和強(qiáng)制日志:

5.生成密碼文件:

orapwd file='$ORACLE_HOME/dbs/orapwCWFOL1' password=oracle entries=5 force=y ignorecase=y;
orapwd file='$ORACLE_HOME/dbs/orapwCWFOL2' password=oracle entries=5 force=y ignorecase=y;
orapwd file='$ORACLE_HOME/dbs/orapwCWFOLB' password=oracle entries=5 force=y ignorecase=y;

或者在一個節(jié)點(diǎn)生成后,然后拷貝到別的節(jié)點(diǎn),重新命名。

6.備庫編輯一個文件,只需要db_name:

[oracle@foldg dbs]$ cat initCWFOLB.ora
db_name=CWFOLB

7.編輯duplicate.sql

[oracle@foldb1 ~]$ cat duplicate.sql
duplicate target database
for standby
from active database
DORECOVER
spfile
set service_names='CWFOLB'
set db_unique_name='CWFOLB'
set log_archive_dest_1='location=+FRA VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=CWFOLB'
set log_archive_dest_2='SERVICE=COWELLORC  LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=CWFOL'
set standby_file_management='AUTO'
set fal_server='CWFOL'
set fal_client='CWFOLB'
set control_files='+DATA'
set cluster_database='false';


出現(xiàn)的錯誤:

1.

MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 01/28/2016 13:03:45
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-04014: startup failed: ORA-00119: invalid specification for system parameter REMOTE_LISTENER
ORA-00132: syntax error or unresolved network name 'foldb-cluster-scan:1521'

RMAN> **end-of-file**

*.remote_listener='foldb-cluster-scan:1521'

解決辦法:再主庫上去掉這個參數(shù),復(fù)制完成后,修改回來。

2.主庫和備庫無法進(jìn)行實時同步, 狀態(tài)為wait_for_log.需要alter system switch logfile才行.

原因是在備庫上沒有針對節(jié)點(diǎn)2的standby log,添加:

alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;
alter database add standby logfile thread 2('+DATA','+FRA') size 200M;

正常結(jié)果如下:

SQL> select status from v$managed_standby;

STATUS
------------
CLOSING
CLOSING
CLOSING
CONNECTED
IDLE
IDLE
APPLYING_LOG
IDLE
IDLE
IDLE
IDLE

11 rows selected.


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI