Hi,
1. Verify that the primary database is setup to remotely archive by checking the parameter log_archive_dest_2=’SERVICE=tnsname alias lgwr’;
2. Verify that remote archiving to the logical standby is successful.
Use the following query to determine the error
SQL> SELECT DEST_ID “ID”,STATUS “DB_status”,DESTINATION “Archive_dest”,ERROR “Error” FROM V$ARCHIVE_DEST;
When there is no error output is as shown
ID DB_STATUS ARCHIVE_DEST ERROR
————————————————————————-
1 VALID LOCATION=c:oraclearchive
2 VALID SERVICE=stby lgwr
3. Verify that archive logs are being created in the standby_archive_dest.
SQL> show parameter standby_archive_dest;
4. Verify that log apply services on the standby are currently running.
SQL> SELECT PID, TYPE, STATUS, HIGH_SCN FROM V$LOGSTDBY;
When querying the V$LOGSTDBY view, pay special attention to the HIGH_SCN
column. This is an activity indicator. As long as it is changing each time
you query the V$LOGSTDBY view, progress is being made. The STATUS column
gives a text description of the current activity.
If the query against V$LOGSTDBY returns no rows then logical apply is not running. Start logical apply by issuing the following statement:
SQL> alter database start logical standby apply;
If the query against V$LOGSTDBY continues to return no rows then proceed to step 5.
5. To determine if there is an archive gap, query the DBA_LOGSTDBY_LOG view on the logical standby database.
SQL> SELECT SUBSTR(FILE_NAME,1,100) FILE_NAME, SUBSTR(SEQUENCE#,1,10) “SEQ#”,
FIRST_CHANGE#, NEXT_CHANGE#, TO_CHAR(TIMESTAMP, ‘HH:MI:SS’) TIMESTAMP,
DICT_BEGIN BEG, DICT_END END, SUBSTR(THREAD#,1,4) “THR#”FROM DBA_LOGSTDBY_LOG ORDER BY SEQUENCE#;
Copy the missing logs to the logical standby system and register them using
the ALTER DATABASE REGISTER LOGICAL LOGFILE statement on your logical standby
database. For example:
SQL> ALTER DATABASE REGISTER LOGICAL LOGFILE ‘/u01/oradata/arch/1_57.arc’;
6. Determine is logical apply is receiving errors while performing apply operations.
SQL> SELECT XIDUSN, XIDSLT, XIDSQN, STATUS, STATUS_CODE FROM DBA_LOGSTDBY_EVENTS WHERE EVENT_TIME = (SELECT MAX(EVENT_TIME) FROM DBA_LOGSTDBY_EVENTS);
7. Query DBA_LOGSTDBY_PROGRESS to verify that log apply services is progressing.
The DBA_LOGSTDBY_PROGRESS view describes the progress of SQL apply operations on the logical standby databases. For example:
SQL> SELECT APPLIED_SCN, APPLIED_TIME, READ_SCN, READ_TIME, NEWEST_SCN, NEWEST_TIME FROM DBA_LOGSTDBY_PROGRESS;
8. Verify that the table that is not receiving rows is not listed in the DBA_LOGSTDBY_UNSUPPORTED.