驗證物理備庫是否執行正常

db_wjw發表於2012-12-24
Verify the Physical Standby Database Is Performing Properly
Once you create the physical standby database and set up redo transport services, you may want to verify database modifications are being successfully transmitted from

the primary database to the standby database.
To see that redo is being received on the standby database, you should first identify the existing archived redo log files on the standby database, force a log

switch and archive a few online redo log files on the primary database, and then check the standby database again. The following steps show how to perform. these tasks.

Step 1 Identify the existing archived redo log files.
On the standby database, query the V$ARCHIVED_LOG view to identify existing files in the archived redo log. For example:
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

     SEQUENCE# FIRST_TIME         NEXT_TIME
    ---------- ------------------ ------------------
             8 11-JUL-07 17:50:45 11-JUL-07 17:50:53
             9 11-JUL-07 17:50:53 11-JUL-07 17:50:58
            10 11-JUL-07 17:50:58 11-JUL-07 17:51:03

    3 rows selected.

Step 2 Force a log switch to archive the current online redo log file.
On the primary database, issue the ALTER SYSTEM SWITCH LOGFILE statement to force a log switch and archive the current online redo log file group:
SQL> ALTER SYSTEM SWITCH LOGFILE;

Step 3 Verify the new redo data was archived on the standby database.
On the standby database, query the V$ARCHIVED_LOG view to verify the redo data was received and archived on the standby database:
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

     SEQUENCE# FIRST_TIME         NEXT_TIME
    ---------- ------------------ ------------------
             8 11-JUL-07 17:50:45 11-JUL-07 17:50:53
             9 11-JUL-07 17:50:53 11-JUL-07 17:50:58
            10 11-JUL-07 17:50:58 11-JUL-07 17:51:03
            11 11-JUL-07 17:51:03 11-JUL-07 18:34:11
    4 rows selected.
    The archived redo log files are now available to be applied to the physical standby database.

Step 4 Verify that received redo has been applied.
On the standby database, query the V$ARCHIVED_LOG view to verify that received redo has been applied:
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
    SEQUENCE# APP
    --------- ---
            8 YES
            9 YES
           10 YES
           11 IN-MEMORY

    4 rows selected.

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

相關文章