Resolving Data file missing issues in DR using RMAN Backup



Ref: Steps to perform for Rolling forward a standby database using RMAN incremental backup when datafile is added to primary (Doc ID 1531031.1)


The standby was having a 2000 archive lag. So plan for compressed increment backup and applying it at standby. Took the backup and executed the run script at standby. The incremental backup was restored successfully. then started the recovery manager process, but unfortunately received some error. The process couldn’t be started. So went for manual recovery to identify the error.



SQL> recover standby database;
ORA-00279: change 11879031311070 generated at 09/27/2011 19:52:56 needed for
thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC89348_0708387551.001
ORA-00280: change 11879031311070 for thread 1 is in sequence #189348


Specify log: {=suggested | filename | AUTO | CANCEL}

ORA-00308: cannot open archived log
'E:\ARCHIVE\ARC89348_0708387551.001'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.


ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'D:\DATA\DATASYSTEM01.DBF'


SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

There was a undo datafile (non system datafile) added. TO SOlve the issue follow this procedure



SQL> alter system set standby_file_management=manual;

System altered.

SQL> alter database create datafile 'D:\DATA\DATAUNDOTBS06.DBF';

Database altered.

SQL>
“alter database create datafile” command is used to add the new datafile to the controlfile.

Note: standby_file_management needs to be manual at the time of creating datafile. This can then be changed to auto after creation.

SQL> alter system set standby_file_management=auto;

System altered.

SQL>
Restoring and recovering DATAUNDOTBS06.DBF datafile.

Catalog the backuppiece.

RMAN> catalog start with 'E:\rman_stand\';

searching for all files that match the pattern E:\rman_stand\

List of Files Unknown to the Database
=====================================
File Name: E:\RMAN_STAND\CONTROL_STAND.CTL
File Name: E:\RMAN_STAND\STANDBY_2DMO62JI_1_1
File Name: E:\RMAN_STAND\STANDBY_2DMO62JI_2_1
File Name: E:\RMAN_STAND\STANDBY_2EMO62JJ_1_1
File Name: E:\RMAN_STAND\STANDBY_2FMO62JL_1_1
File Name: E:\RMAN_STAND\STANDBY_2GMO62SK_1_1
File Name: E:\RMAN_STAND\STANDBY_2HMO62ST_1_1

Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: E:\RMAN_STAND\CONTROL_STAND.CTL
File Name: E:\RMAN_STAND\STANDBY_2DMO62JI_1_1
File Name: E:\RMAN_STAND\STANDBY_2DMO62JI_2_1
File Name: E:\RMAN_STAND\STANDBY_2EMO62JJ_1_1
File Name: E:\RMAN_STAND\STANDBY_2FMO62JL_1_1
File Name: E:\RMAN_STAND\STANDBY_2GMO62SK_1_1
File Name: E:\RMAN_STAND\STANDBY_2HMO62ST_1_1

RMAN> recover database noredo;

Starting recover at 04-OCT-11
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00092: D:\DATA\DATAUNDOTBS06.DBF
channel ORA_DISK_1: reading from backup piece E:\RMAN_STAND\STANDBY_2FMO62JL_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=E:\RMAN_STAND\STANDBY_2FMO62JL_1_1 tag=TAG20111003T124327
channel ORA_DISK_1: restore complete, elapsed time: 00:07:46
Finished recover at 04-OCT-11

RMAN>
Great Oracle RMAN, identified the missing datafile and recovered it with only “recover database” command.

Testing with manual standby recovery.

C:\>sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 4 20:08:36 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> recover standby database;
ORA-00279: change 11880271836359 generated at 10/03/2011 12:43:31 needed for
thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC91449_0708387551.001
ORA-00280: change 11880271836359 for thread 1 is in sequence #191449


Specify log: {=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 11880271860098 generated at 10/03/2011 12:48:23 needed for
thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC91450_0708387551.001
ORA-00280: change 11880271860098 for thread 1 is in sequence #191450
ORA-00278: log file 'E:\ARCHIVE\ARC91449_0708387551.001' no longer
needed for this recovery


ORA-00279: change 11880272264500 generated at 10/03/2011 12:51:41 needed for
thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC91451_0708387551.001
ORA-00280: change 11880272264500 for thread 1 is in sequence #191451
ORA-00278: log file 'E:\ARCHIVE\ARC91450_0708387551.001' no longer
needed for this recovery


ORA-00279: change 11880272271280 generated at 10/03/2011 12:52:30 needed for
thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC91452_0708387551.001
ORA-00280: change 11880272271280 for thread 1 is in sequence #191452
ORA-00278: log file 'E:\ARCHIVE\ARC91451_0708387551.001' no longer
needed for this recovery




That’s it we can start with Managed Recovery Process (MRP) process.

No comments:

Post a Comment