DG歸檔傳輸報 ORA-16191

龍山游龍發表於2015-08-05

整理文件時,發現生產端和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 oracle@192.168.186.88:/u01/app/base/product/11.2.0/db_1/dbs/
oracle@192.168.186.88'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程式正常,歸檔日誌已經同步

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30310891/viewspace-1762280/,如需轉載,請註明出處,否則將追究法律責任。

相關文章