oracle ora 16047,令人误解的ORA-16047: DGID mismatch between destination setting and target database...

今天为一个Rac onenode的主库搭建好一个dg库之后,一直没有传日志,在主库的alertlog中,有报错:

Thu Jun 29 14:55:34 2017

ALTER SYSTEM SET log_archive_dest_state_2='DEFER' SCOPE=BOTH;

Thu Jun 29 14:55:44 2017

ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;

Thu Jun 29 14:55:44 2017

Errors in file /data/prd/oracle/diag/rdbms/payroll/payroll_2/trace/payroll_2_tt00_27554.trc:

ORA-16047: DGID mismatch between destination setting and target database

Thu Jun 29 14:55:44 2017

Errors in file /data/prd/oracle/diag/rdbms/payroll/payroll_2/trace/payroll_2_tt00_27554.trc:

ORA-16047: DGID mismatch between destination setting and target database

Thu Jun 29 14:55:44 2017

Errors in file /data/prd/oracle/diag/rdbms/payroll/payroll_2/trace/payroll_2_tt00_27554.trc:

ORA-16047: DGID mismatch between destination setting and target database

Thu Jun 29 14:55:45 2017

Thread 2 advanced to log sequence 632 (LGWR switch)

Current log# 7 seq# 632 mem# 0: +DATA/PAYROLL/ONLINELOG/group_7.303.946836271

Current log# 7 seq# 632 mem# 1: +FRA/PAYROLL/ONLINELOG/group_7.791.946836271

Thu Jun 29 14:55:45 2017

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

ThuJun2914:55:342017

ALTERSYSTEMSETlog_archive_dest_state_2='DEFER'SCOPE=BOTH;

ThuJun2914:55:442017

ALTERSYSTEMSETlog_archive_dest_state_2='ENABLE'SCOPE=BOTH;

ThuJun2914:55:442017

Errorsinfile/data/prd/oracle/diag/rdbms/payroll/payroll_2/trace/payroll_2_tt00_27554.trc:

ORA-16047:DGIDmismatchbetweendestinationsettingandtargetdatabase

ThuJun2914:55:442017

Errorsinfile/data/prd/oracle/diag/rdbms/payroll/payroll_2/trace/payroll_2_tt00_27554.trc:

ORA-16047:DGIDmismatchbetweendestinationsettingandtargetdatabase

ThuJun2914:55:442017

Errorsinfile/data/prd/oracle/diag/rdbms/payroll/payroll_2/trace/payroll_2_tt00_27554.trc:

ORA-16047:DGIDmismatchbetweendestinationsettingandtargetdatabase

ThuJun2914:55:452017

Thread2advancedtologsequence632(LGWRswitch)

Currentlog# 7 seq# 632 mem# 0: +DATA/PAYROLL/ONLINELOG/group_7.303.946836271

Currentlog# 7 seq# 632 mem# 1: +FRA/PAYROLL/ONLINELOG/group_7.791.946836271

ThuJun2914:55:452017

根据oerr的报错信息:

SQL> !oerr ora 16047

16047, 00000, "DGID mismatch between destination setting and target database"

// *Cause: The DB_UNIQUE_NAME specified for the destination did not match

// the DB_UNIQUE_NAME at the target database.

// *Action: Make sure the DB_UNIQUE_NAME specified in the LOG_ARCHIVE_DEST_n

// parameter matches the DB_UNIQUE_NAME parameter defined at the

// destination.

SQL>

1

2

3

4

5

6

7

8

9

SQL>!oerrora16047

16047,00000,"DGID mismatch between destination setting and target database"

// *Cause:  The DB_UNIQUE_NAME specified for the destination did not match

//          the DB_UNIQUE_NAME at the target database.

// *Action: Make sure the DB_UNIQUE_NAME specified in the LOG_ARCHIVE_DEST_n

//          parameter matches the DB_UNIQUE_NAME parameter defined at the

//          destination.

SQL>

检查了主库和备库的db_unique_name,发现都没有问题。

进一步检查v$dataguard_status发现:

dbd0c666ddb23d849a211cd61e72a184.png

可以看到有个16062的报错。我们看看ora-16062报错的含义:

SQL> !oerr ora 16062

16062, 00000, "standby database not in Data Guard configuration"

// *Cause: The standby database was not found in the Data Guard configuration

// of the server.

// *Action: Add the database unique name of the standby database to the

// DG_CONFIG attribute of the LOG_ARCHIVE_CONFIG database

// initialization parameter.

SQL>

1

2

3

4

5

6

7

8

9

SQL>!oerrora16062

16062,00000,"standby database not in Data Guard configuration"

// *Cause:  The standby database was not found in the Data Guard configuration

//          of the server.

// *Action: Add the database unique name of the standby database to the

//          DG_CONFIG attribute of the LOG_ARCHIVE_CONFIG database

//          initialization parameter.

SQL>

检查主备库的LOG_ARCHIVE_CONFIG,发现主库已经配置,但是备库的LOG_ARCHIVE_CONFIG没有配置。所以ORA-16047的报错只是表象,造成日志不同步的真正的原因是ora-16062。

加上备库的LOG_ARCHIVE_CONFIG=DG_CONFIG,并且在主库重新defer+enable log_archive_dest_state_2之后,故障解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值