cancel
Showing results for 
Search instead for 
Did you mean: 

WAIT_FOR_GAP error on Standby Server

Former Member
0 Kudos

Hello,

I have a Oracle Data Guard config with log shipping done via LGWR and FAL processes.

There is a WAIT_FOR_GAP error on the Standby server.

On the Standby:

SQL> select * from v$archive_gap;

THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#

-


-


-


1 11352 11511

SQL> select sequence#, first_time, next_time from v$archived_log order by sequence#

...................

11350 10-MAY-10 10-MAY-10

11351 10-MAY-10 10-MAY-10

SEQUENCE# FIRST_TIME NEXT_TIME

-


-


-


11512 17-MAY-10 17-MAY-10

11513 17-MAY-10 17-MAY-10

11514 17-MAY-10 17-MAY-10

11515 17-MAY-10 17-MAY-10

11516 17-MAY-10 17-MAY-10

11517 17-MAY-10 17-MAY-10

11518 17-MAY-10 17-MAY-10

11519 17-MAY-10 17-MAY-10

11520 17-MAY-10 18-MAY-10

11521 18-MAY-10 18-MAY-10

11522 18-MAY-10 18-MAY-10

SEQUENCE# FIRST_TIME NEXT_TIME

-


-


-


11523 18-MAY-10 18-MAY-10

11524 18-MAY-10 18-MAY-10

11525 18-MAY-10 18-MAY-10

Does this mean log 11352 to 11511 is missing on the Standby? Can I copy these logs to the archive log directory of the Primary server and on the next managed recovery, it will copy and apply these missing logs on the Standby?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_koehler
Active Contributor
0 Kudos

Hello Steven,

> Does this mean log 11352 to 11511 is missing on the Standby?

Yes.

> Can I copy these logs to the archive log directory of the Primary server and on the next managed recovery, it will copy and apply these missing logs on the Standby?

No. You have to copy the needed archive log files to the standby and you need to register them on the standby database.

Depending on your oracle release (and maybe due to some bug) you have to issue the following SQL for every archive log:


SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE '<LOGFILE_PATH>';

If you use RMAN for restoring the archive logs - they are registered automatically.

Regards

Stefan

Former Member
0 Kudos

Hello Stefan,

After I have registered the LOGFILE manually on the STANDBY server, do I need to delete the physical log file?

And in order to apply the registered LOGFILE, I just start the managed recovery i.e ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION?

Thanks!

stefan_koehler
Active Contributor
0 Kudos

Hello Steven,

> After I have registered the LOGFILE manually on the STANDBY server, do I need to delete the physical log file?

No .. the registration is needed, that oracle knows that the log file is located on the standby site (and some metadata information). You still need the physical log file for recovery in the file system.

> And in order to apply the registered LOGFILE, I just start the managed recovery

Yes.

Regards

Stefan

Answers (1)

Answers (1)

Former Member
0 Kudos

HiSteven,

Please check the last log applied at the standby site. This will answer your question..

Anup