This discussion is archived
7 Replies Latest reply: May 7, 2013 11:48 AM by 993195 RSS

Can't get dataguard to recover after SAN crash.

993195 Newbie
Currently Being Moderated
Hello,

Last week we had a SAN crash and both our primary and dataguard databases were affected. In order to get the primary up we had to restore the control file from autobackup, recover, then open reset logs. We have been back up since Friday and I had to rebuild the dataguard but I am getting errors on the recovery. We take full RMAN backups every night. Today I issued the following commands to rebuild the dataguard.

On primary

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 3;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0_64/Db_1/dbs/snapcf_bcso.f'; # default


SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
RMAN>BACKUP ARCHIVELOG ALL NOT BACKED UP 1 TIMES;
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY;

scp today backupset folder to SCP site.

On standby

RMAN> restore standby controlfile from '/<standby control>';

RMAN> run {
ALLOCATE CHANNEL c1 DEVICE TYPE DISK ;
restore database;}

RMAN> list backup of archivelog all; --Max seq = 793

RMAN> recover database until sequence 794;

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1: '/u01/app/oracle/oradata/bcso/system01.dbf'

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/07/2013 14:27:28
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 595 lowscn 10841587866338 found to restore
.
.
.
RMAN-06025: no backup of log thread 1 seq 542 lowscn 10841534510522 found to restore
MAN-06025: no backup of log thread 1 seq 541 lowscn 1084153449
Recovery Manager complete.


I understand it wants these files but why does it want them when I did a full backup and backup of all archivelogs since the full backup? Why does it want the older archivelogs than the backup itsself? The dataguard is up but its only taking the new archivelogs and not applying them. It is not fixing the gaps. There shouldn't be any gaps since I moved over the full backup and archivelogs since the backup.

Thanks
  • 1. Re: Can't get dataguard to recover after SAN crash.
    FreddieEssex Pro
    Currently Being Moderated
    Are you using 11gR2? If so why not re-instantiate your standby using:
    duplicate target database for standby from active database......
    http://www.oracle-base.com/articles/11g/duplicate-database-using-rman-11gr2.php

    Why are you using recover. Use duplicate database:
    duplicate target database for standby dorecover nofilenamecheck;
    http://docs.oracle.com/cd/B19306_01/server.102/b14239/rcmbackp.htm
  • 2. Re: Can't get dataguard to recover after SAN crash.
    993195 Newbie
    Currently Being Moderated
    I am on 10.2.0.5.

    I am using the steps in note 469493.1.
  • 3. Re: Can't get dataguard to recover after SAN crash.
    FreddieEssex Pro
    Currently Being Moderated
    Okay fair enough, this guide is a Step by step guide on how to create a physical standby database using RMAN without using duplicate command.

    Personally I've always used duplicate database from 9i onwards, but your choice.

    Did you do a restore database before you did your recover database? In Step 4 of this doc you do a restore before recover.

    Amendment: Sorry...just re-read your post and saw you did do a restore before recover. Not sure why you're getting this error. I would be inclined to try duplicate.

    Edited by: Freddie Essex on 07-May-2013 17:06

    Amendment:
    Also check the following note:
    While Duplicating the Database ,Rman Errors ora-1547,ora-1152,ora-1110 During Recovery [ID 274118.1]

    This implies you would get the same error when you do a duplicate.

    Backup your database using the following before you do the restore and recover:
    backup database plus archivelog;
    Edited by: Freddie Essex on 07-May-2013 17:12
  • 4. Re: Can't get dataguard to recover after SAN crash.
    993195 Newbie
    Currently Being Moderated
    I appreciate the response but I'm not sure doing what you suggest is going to help since my backups are essentially doing the same thing. I have used this same process a couple times when we had issues and the gaps couldn't be resolved. Something is different after the recovery and doing the open resetlogs. I feel like I should be doing something on the primary to reset the control file now.
  • 5. Re: Can't get dataguard to recover after SAN crash.
    993195 Newbie
    Currently Being Moderated
    I think there may be some inconsistencies from after recreating the control file. Looking at note 1475632.1

    Once the controlfile is recreated, the view v$flash_recovery_area_usage may not reflect the actual usage on disk. So you may need to run this command to catalog everything back into the controlfile.

    RMAN> catalog recovery area;

    I'm going to try and start over now that I ran that command.
  • 6. Re: Can't get dataguard to recover after SAN crash.
    FreddieEssex Pro
    Currently Being Moderated
    Apologies....I should have read your post more carefully. I didn't see you were running a full RMAN backup every night.
  • 7. Re: Can't get dataguard to recover after SAN crash.
    993195 Newbie
    Currently Being Moderated
    Can someone tell me the implications of using the command RESET DATABASE on my system days after I did the open reset logs? I opened the database with the ALTER DATABASE OPEN RESETLOGS in SQL not RMAN and I see the below note.....

    Re: Can't get dataguard to recover after SAN crash.

    To reset the incarnation of the target database in the RMAN repository, which means to do either of the following actions:

    •Inform RMAN that the SQL statement ALTER DATABASE OPEN RESETLOGS has been executed and that a new incarnation of the target database has been created. Note that if you run the RMAN command ALTER DATABASE OPEN RESETLOGS (not the SQL statement with the same keywords), then RMAN resets the target database automatically so that you do not have to run RESET DATABASE. By resetting the database, RMAN considers the new incarnation as the current incarnation of the database.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points