ORA-16047: DGID mismatch between destination setting and target database
搭完DG後發現日誌輸不過來,檢視日誌:
Thread 1 advanced to log sequence 3769 (LGWR switch)
Current log# 4 seq# 3769 mem# 0: /oradata/tpakvdata/redo04.log
Tue Jul 14 11:47:00 2015
ARC3: Archivelog destination LOG_ARCHIVE_DEST_2 disabled: Data Guard configuration identifier mismatch
Current log# 4 seq# 3769 mem# 0: /oradata/tpakvdata/redo04.log
Tue Jul 14 11:47:00 2015
ARC3: Archivelog destination LOG_ARCHIVE_DEST_2 disabled: Data Guard configuration identifier mismatch
然後在主庫上查詢v$ARCHIVE_DEST檢視:
SQL> select dest_name, status, error from v$archive_dest WHERE DEST_ID = 2;
DEST_NAME
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
LOG_ARCHIVE_DEST_2
DISABLED ORA-16047: DGID mismatch between destination setting and target
database
DEST_NAME
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
LOG_ARCHIVE_DEST_2
DISABLED ORA-16047: DGID mismatch between destination setting and target
database
在網上查詢後,需要重點檢查如下引數:
log_archive_config
fal_client
fal_server
log_archive_dest_2
fal_client
fal_server
log_archive_dest_2
log_archive_dest_state_2
經過檢查,如上的引數設定在內容上是沒有問題的,有可能就是格式的問題了(比如大小寫等),於是,我重置了主庫的log_archive_dest_2 引數:
alter system set LOG_ARCHIVE_DEST_2='SERVICE=tpakvdg ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=tpakvdg';
然後再查詢v$ARCHIVE_DEST檢視,發現狀態已變成DEFERRED :
SQL> select DEST_ID,DEST_NAME,STATUS,BINDING,ERROR from v$ARCHIVE_DEST where status<>'INACTIVE';
DEST_ID
----------
DEST_NAME
--------------------------------------------------------------------------------
STATUS BINDING
--------- ---------
ERROR
-----------------------------------------------------------------
1
LOG_ARCHIVE_DEST_1
VALID OPTIONAL
DEST_ID
----------
DEST_NAME
--------------------------------------------------------------------------------
STATUS BINDING
--------- ---------
ERROR
-----------------------------------------------------------------
2
LOG_ARCHIVE_DEST_2
DEFERRED OPTIONAL
DEST_ID
----------
DEST_NAME
--------------------------------------------------------------------------------
STATUS BINDING
--------- ---------
ERROR
-----------------------------------------------------------------
1
LOG_ARCHIVE_DEST_1
VALID OPTIONAL
DEST_ID
----------
DEST_NAME
--------------------------------------------------------------------------------
STATUS BINDING
--------- ---------
ERROR
-----------------------------------------------------------------
2
LOG_ARCHIVE_DEST_2
DEFERRED OPTIONAL
再檢視引數log_archive_dest_state_2 ,還是顯示enable:
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
於是,試著重置log_archive_dest_state_2 引數:
SQL> alter system set LOG_ARCHIVE_DEST_STATE_2=defer scope=both;
System altered.
SQL> select dest_name, status, error from v$archive_dest WHERE DEST_ID = 2;
DEST_NAME
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
LOG_ARCHIVE_DEST_2
DEFERRED
SQL>
SQL>
SQL> alter system set LOG_ARCHIVE_DEST_STATE_2=enable scope=both;
System altered.
SQL>
SQL> select dest_name, status, error from v$archive_dest WHERE DEST_ID = 2;
DEST_NAME
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
LOG_ARCHIVE_DEST_2
VALID
System altered.
SQL> select dest_name, status, error from v$archive_dest WHERE DEST_ID = 2;
DEST_NAME
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
LOG_ARCHIVE_DEST_2
DEFERRED
SQL>
SQL>
SQL> alter system set LOG_ARCHIVE_DEST_STATE_2=enable scope=both;
System altered.
SQL>
SQL> select dest_name, status, error from v$archive_dest WHERE DEST_ID = 2;
DEST_NAME
--------------------------------------------------------------------------------
STATUS ERROR
--------- -----------------------------------------------------------------
LOG_ARCHIVE_DEST_2
VALID
可以看到,狀態終於變成valid了,再檢視alert日誌:
Tue Jul 14 15:05:56 2015
******************************************************************
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2
******************************************************************
Tue Jul 14 15:05:56 2015
Archived Log entry 4032 added for thread 1 sequence 3772 ID 0x33cbbb6a dest 1:
LNS: Standby redo logfile selected for thread 1 sequence 3773 for destination LOG_ARCHIVE_DEST_2
Tue Jul 14 15:05:56 2015
ARC0: Standby redo logfile selected for thread 1 sequence 3772 for destination LOG_ARCHIVE_DEST_2
******************************************************************
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2
******************************************************************
Tue Jul 14 15:05:56 2015
Archived Log entry 4032 added for thread 1 sequence 3772 ID 0x33cbbb6a dest 1:
LNS: Standby redo logfile selected for thread 1 sequence 3773 for destination LOG_ARCHIVE_DEST_2
Tue Jul 14 15:05:56 2015
ARC0: Standby redo logfile selected for thread 1 sequence 3772 for destination LOG_ARCHIVE_DEST_2
已經可以成功傳輸日誌檔案。看來檢視v$archive_dest中的status才是傳輸路徑的真正狀態,如果光看LOG_ARCHIVE_DEST_STATE_2的設定很有可能會被誤導。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25465866/viewspace-1732925/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Find and Fix the Mismatch Between DBA_SEGMENTS and DBA_EXTENTS ViewsView
- Setting the Database Time Zone (80)Database
- 【Basis】HANA Database SR Basis SettingDatabase
- Oracle DataGuard Standby database ID mismatch錯誤OracleDatabase
- rfs (PID:146054): Database mount ID mismatch案例Database
- failed to establish dependency between database GERP and diskgroup resourceAIDatabase
- ERROR: failed to establish dependency between database db_name and diskgroupErrorAIDatabase
- 11g rman新特性 duplicate target database for standby from active databaseDatabase
- RMAN-05541: no archived logs found in target databaseHiveDatabase
- ORA-16009: remote archive log destination must be a STANDBY databaseREMHiveDatabase
- ORA-00824:cannot set sga_target due to existing internal setting --SOLUTION
- Bug 13250486 : ADD STANDBY DATABASE FOR TARGET WITH FLASHBACK ON FAILS WITH ERRDatabaseAI
- Duplicating a Database Without Recovery Catalog or Target ConnectionDatabase
- oracle12.2 adg ORA-46952: standby database format mismatch for password fileOracleDatabaseORM
- RMAN-20005: target database name is ambiguousDatabase
- 【RMAN】RMAN-20001: target database not found in recoveryDatabase
- 【RMAN】RMAN-05001: auxiliary filename conflicts with the target databaseUXDatabase
- hyperledger fabric - chaincode fingerprint mismatch data mismatchAI
- Incorrect MEMORY_MAX_TARGET (> Available RAM) Can Lead To Database HangsAIDatabase
- 使用Duplicate target database命令恢復線上oracle datagard備庫DatabaseOracle
- RMAN-20001: target database not found in recovery catalogDatabase
- RMAN-05517: temporary file conflicts with file used by target database(zt)Database
- 用匯入匯出誇平臺遷移所有資料( Move a Database Between Platforms)DatabasePlatform
- DBMS_FILE_TRANSFER package which provides an API for copying binary files between database serversPackageIDEAPIDatabaseServer
- PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database isSQLPackageRESTDatabase
- sendmail settingAI
- 使用oracle 11g rman新特性 duplicate target database for standby from active database 建立物理dataguard並開啟RealOracleDatabase
- SMART Goal SettingGo
- Data Guard無法同步報ORA-16047錯
- Oracle Executable Binary Mismatch DetectedOracle
- Diffrence Between delete and truncatedelete
- length() between oracle and postgresqlOracleSQL
- Relationship between BAPI and RFCAPI
- memory_max_target,memory_target,pga_aggregate_target,sga_target
- Hide RMAN Passwords when Connecting to a Target Database (Doc ID 183377.1)IDEDatabase
- oracle 10g rman duplicate target database for standby會自動新增臨時檔案Oracle 10gDatabase
- Procedure for Setting Partner FunctionsFunction
- 阿里雲setting阿里