Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 959
  • Last Modified:

DR getting gap with primary, data guard

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
1 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/libnwora.so,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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now