Re: Data Guard - Checking Current Status

From: Maureen English <maureen.english_at_alaska.edu>
Date: Mon, 29 Dec 2014 15:07:08 -0900
Message-ID: <CAAzCTjHt9JDx-Ce6fMvR2mh6JO4GoWi8koRnWdAP533TMFcnQg_at_mail.gmail.com>



Here are 2 checks that we do when we're practicing a failover.

Verify that the standby database has the most recently archived redo log file for each primary

   database redo thread.

   Query the V$ARCHIVED_LOG view on the target standby database to obtain the highest log sequence number

   for each redo thread. For example:

      SQL> SELECT UNIQUE THREAD# AS THREAD, MAX(SEQUENCE#) OVER (PARTITION BY thread#) AS LAST from V$ARCHIVED_LOG;

      THREAD     LAST
      ---------- ----------
               1        100

   If possible, copy the most recently archived redo log file for each primary database redo thread to the standby

   database if it does not exist there, and register it. This must be done for each redo thread.

   For example:

   SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';

Identify and resolve any archived redo log gaps.

   Query the V$ARCHIVE_GAP view on the target standby database to determine if there are any redo gaps on the

   target standby database. For example:

      SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

      THREAD#    LOW_SEQUENCE# HIGH_SEQUENCE#
      ---------- ------------- --------------
               1            90             92

   In this example the gap comprises archived redo log files with sequence numbers 90, 91, and 92 for thread 1.

   If possible, copy any missing archived redo log files to the target standby database from the primary database

   and register them at the target standby database. This must be done for each redo thread. For example:

      SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';

On Mon, Dec 29, 2014 at 2:03 PM, Michael Cunningham < napacunningham_at_gmail.com> wrote:

> Hello, we are looking for the best way to check if the standby is
> up-to-date (or at least how up-to-date it really is) when it is necessary
> to fail over.
>
> Oracle 12cR1 on Linux
>
> The scenario is the primary server has crashed and we are faced with
> finding out how up-to-date the standby is. It would be nice to know the
> scn if possible.
>
> We are configured with standby redo logs in Maximum Performance mode. If
> this is not enough info please let me know.
>
> P.S. We are currently querying v$dataguard_stats and we can see the datum
> info, but we are curious if there is better info we could/should be looking
> at.
>
> --
> Michael Cunningham
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Dec 30 2014 - 01:07:08 CET

Original text of this message