DR getting gap with primary, data guard

Posted on 2007-08-10
Last Modified: 2013-12-18
Hi, I have an oracle 10G that not in synch with DR box. I run the below query and found the gap, right now I want to apply the archive log and reduce the gap, what can I do here? what is the step?

SQL> select 'Thread '||a.thread#, max(a.sequence#) primary, max(b.sequence#) DR, max(a.sequence# ) - max(b.sequence#) gap
  2       from v$archived_log a, v$archived_log b where a.archived='YES' and b.applied='YES' and b.applied='YES'
   and a.thread#=b.thread# group by a.thread#;  3

'THREAD'||A.THREAD#                                PRIMARY         DR        GAP
----------------------------------------------- ---------- ---------- ----------
Thread 1                                             33891      33875         16
Thread 2                                             32882      32863         19
Question by:motioneye
    1 Comment
    LVL 14

    Accepted Solution

    If you have the archivelogs at the local destination.

     it the archivelog location is /d01/database/archivelog/

    You can find the exact log file and take it to the DR  location ( thro scp or ftp ) and you can register it in the physical databasel

    Steps :

    1. scp the files to the other location
     2. DR database sql > alter database register physical logfile '/path/filename';

    Or if you have configured RMAN and if you archives are not in filesystem say ASM or RAW .

    use this :
     1.Connect to you target  and RMAN reposiory
     rman  target sys/p1pathway@plprddr1  rcvcat rman/rman@PWRCAT
     2.Back the archivelog to local destination  from thee backup piece or from ASM

    run {
    resync catalog;
    allocate channel t1 type 'SBT_TAPE' MAXPIECESIZE 8000M
    parms 'SBT_LIBRARY=/lib/,ENV=(NSR_SERVER=,NSR_DATA_VOLUME_POOL=trans,NSR_GROUP=Oracle,NSR_DEBUG_FILE=/tmp/debug.out)';
    set archivelog destination to '/d01';
    restore archivelog sequence  betwen 257and 298 thread 2 format '/d01/%e.arc';
    release channel t1;

    For each thread you have to do seperately and ship the logs to the DR site.
    3.One by one if you register it will take it up.

    Basically FAL_SERVER and FAL_CLIENT would have requested for the files which is in between the GAP.If it find the logs are not available in archivelog destination,may be backed up then we have to restore it from the backup in produtuon site wherein FAL will do the job.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
    From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
    This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
    This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now