Restore a datafile from backup is necessary whenever you disk is crushed or whenever there is user errors or someone has delete datafile. Remember that user managed restore operation is identical of the RMAN command RESTORE. If you like to restore any datafile then just copy it to the location in the parameter specified in control_files. If you like to restore any control file then just use copy command or any GUI tool in the destination which spfile or pfile points in control_files parameter.
So, in case of RMAN, RMAN>RESTORE datafile 2;
is same as of user managed $scp backup_of_the_file real_destination
In the following section I wrote in which circumstances what you have to do if you choose user managed recovery mechanism.
A)If you loss one or more datafile: If you lose one or more datafiles then copy the datafiles to the location where it was.(Equivalent to RMAN RESTORE) Or alternatively you can copy it in another location and point the control file to the new location by ALTER DATABASE RENAME FILE ' ' TO ' ';(Equivalent to RMAN SET NEWNAME ..) After copying recovery is required whenever the checkpoint SCN in the datafile header does not match the checkpoint SCN for the datafile that is recorded in the control file. Same as of RECOVER in RMAN.
B)If All copies of the current control file Lost: If all copies of your control files are lost then if you have backup of the control file then copy it to the location as it is located in CONTROL_FILES parameter in pfile/spfile. After copied to desired location you might have to open your database with RESETLOGS option.
If you don't have backup of control file then create a new one. This is described on
How to re-create Control file
C)If a copy of a multiplexed control file Lost: If one or two copies of control file are lost and in least one copy of the control file is intact then copy the intact control file to other locations as it was in CONTROL_FILES parameter inside pfile/spfile. If you have one good copy and you want to copy-this procedure is described on How to solve problem of inconsistent control file.If you cannot copy the control file to its original location, then edit the initialization parameter file to reflect a new location. Then, open the database.
D)If archived log lost that is needed for media recovery: If you have backup of archived log that is needed for recovery copy it to the location and perform recovery from there. The deleted archive logs that is not needed for media recovery(i.e the archived logs that were generated before taking backup) has no affect. But if the deleted archived log that is needed for media recovery and you have no backup then you must perform incomplete recovery (UNTIL SCN) and open the database with RESETLOGS open.
E)Spfile is Lost: If you loss your current spfile then using user managed recovery you can recover it. The detail procedure is discussed on What you will do if spfile lost Look at Solution of The problem Section
Related Documents:
-----------------------
What you will do if spfile lost Look at Solution of The problem Section
How to solve problem of inconsistent control file.
How to re-create Control file
No comments:
Post a Comment