Alfredo Krieg's DBA blog - Oracle ACE: September 2016

Wednesday, September 21, 2016

Tim Gorman is our guest speaker for September 30th NEOOUG's quarterly meeting.


Tim currently works as a Technical Consultant at Delphix. Oracle ACE Director, Oak Table member and an advocate of the North East Ohio Oracle Users Group for many years. This time Tim brings two interesting sessions, “Split Brain Syndrome” and “Scaling To Infinity”.

Join us for these sessions, have lunch and learn from one of the most remarkable leader in technology.

Keep in mind that this time this quarterly meeting is to be held at the new Oracle's facility in Beachwood, OH. We also require you to pre-register to this event using below URL:


More information here:



Thanks,
Alfredo

Labels:

Friday, September 16, 2016

WAIT_FOR_GAP. How to restore missing archivelogs from backup?

In a Dataguard configuration, Oracle’s RFS (Remote File Server) writes redo data to the standby. When for any reason it can’t write this data, MRP (Managed Recovery Process) will wait for the archivelog to be applied and have the status “WAIT_FOR_LOG”. This will lead the standby to be out-of-sync with the primary database.

Sometimes some archivelogs can’t be transferred from primary database to the standby leaving a gap in the archivelog sequence. The MRP process will have the status “WAIT_FOR_GAP”.  

In order to fix the archivelog gap we have to manually transfer the archivelogs missing.

To find the gap you can query v$archive_gap (gv$archive_gap for RAC).

SELECT INST_ID, THREAD#, HIGH_SEQUENCE#, LOW_SEQUENCE# FROM GV$ARCHIVE_GAP;

INST_ID       THREAD#       HIGH_SEQUENCE#       LOW_SEQUENCE#
------------- --------------- ------------------------ ------------------------
2             2             823                  811


You can see that we are missing archivelogs from sequence 811 to 823 for thread 2. If these archivelogs are not available in the primary we have to restore them from backup.

RMAN> RESTORE ARCHIVELOG FROM SEQUENCE 811 UNTIL SEQUENCE 823 THREAD=2;

Keep in mind that parameter THREAD defaults to 1, so you must specify the thread number when you are trying to restore from a different thread.

After restoring these archivelogs the RFS process should transfer them automatically to the standby. Verify if the gap is fixed.


Thanks,

Alfredo

Labels: , , , ,