DG归档传输报 ORA-16191

原文地址:http://blog.itpub.net/30310891/viewspace-1762280/

整理文档时,发现生产端和DG端归档日志没有同步
检查生产端:
SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PRIMARY

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
            18

SQL> select dest_name,status,error from v$archive_dest where dest_id=1 or dest_id=2;

DEST_NAME                      STATUS    ERROR
------------------------------ --------- ----------------------------------------------------------------------------------------------------
LOG_ARCHIVE_DEST_1             VALID
LOG_ARCHIVE_DEST_2             ERROR     ORA-16191: Primary log shipping client not logged on standby

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=standby arch ASYNC VAL
                                                 ID_FOR=(ONLINE_LOGFILES,PRIMAR
                                                 Y_ROLE) DB_UNIQUE_NAME=orcl
                                                 
SQL> show parameter log_archive_dest_state_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2             string      ENABLE

SQL> show parameter remote_login_passwordfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE

经查,参数配置均没问题

检查DG端;
SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
            13
            
SQL> select process,pid,status from v$managed_standby;

PROCESS          PID STATUS
--------- ---------- ------------
ARCH            2400 CONNECTED
ARCH            2402 CONNECTED
ARCH            2404 CONNECTED
ARCH            2406 CONNECTED                                                                                         
未发现RFS进程

查alert日志
[oracle@primary trace]$ tail -f alert_orcl.log |more
      returning error ORA-16191
------------------------------------------------------------
Wed Aug 05 16:43:54 2015
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE, 
and that the SYS password is same in the password files.
      returning error ORA-16191
------------------------------------------------------------
remote_login_passwordfile参数配置,经查没问题
问题估计在密码文件这块,当初搭建DG时,在主备两端通过 orapwd file=orapworcl password=oracle 生成
现将DG端密码文件删掉,从生产端scp密码文件到DG端,问题解决
[oracle@standby dbs]$ rm -rf orapworcl 
[oracle@primary dbs]$ scp orapworcl [email protected]:/u01/app/base/product/11.2.0/db_1/dbs/
[email protected]'s password: 
orapworcl                                                                                                                         100% 1536     1.5KB/s   00:00

验证生产端:
SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PRIMARY

SQL> alter system set log_archive_dest_state_2 = DEFER scope=both; 

System altered.

SQL> alter system set log_archive_dest_state_2 = ENABLE scope=both;

System altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
            20
            
SQL> select dest_name,status,error from v$archive_dest where dest_id=1 or dest_id=2;

DEST_NAME                      STATUS    ERROR
------------------------------ --------- ----------------------------------------------------------------------------------------------------
LOG_ARCHIVE_DEST_1             VALID
LOG_ARCHIVE_DEST_2             VALID

验证DG端:
SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
            20

SQL> select process,pid,status from v$managed_standby;

PROCESS          PID STATUS
--------- ---------- ------------
ARCH            2400 CONNECTED
ARCH            2402 CONNECTED
ARCH            2404 CONNECTED
ARCH            2406 CONNECTED
RFS             2611 IDLE
RFS             2613 IDLE
RFS             2615 IDLE

7 rows selected.
RFS进程正常,归档日志已经同步


猜你喜欢

转载自blog.csdn.net/cuiyan1982/article/details/80009420