Today I had the honor to do a few Rman full database recovery experiment, here is a brief version, easy to forget when you can find the instantaneous speed
A full recovery
1. Database entire Library "full recovery"
$ rman Target/Login Rman tool, if the catalog is used, then the login method Rman Targetsys/oracle@lscatalogcata/cata@leo
Rman> startup mount must be Mount state to restore and recover the database
rman> RESTORE database, copying old data files to overwrite corrupted data files
rman> recover database; Data File header SCN number synchronize the last SCN number in the current log "full recovery"
Rman> ALTER DATABASE open, opening data file
Two not fully restored
1. Based on point-in-time "incomplete recovery"
Use until time, until SCN, until sequence parameters directly in the Restore recover command
This approach avoids using the run code block, and it is recommended that you "must boot to mount state to restore and recover the database"
startup Mount;
Restore database until Time "to_date (' 2012-04-04 19:13:50 ', ' yyyy-mm-dd hh24:mi:ss ')";
Recover database until Time "to_date (' 2012-04-04 19:13:50 ', ' yyyy-mm-dd hh24:mi:ss ')";
ALTER DATABASE open resetlogs; "Resetlogs is only valid after incomplete recovery, incomplete recovery must be resetlogs/noresetlogs option to open data, reset archive log serial number starting from 1"
Note: This command restores the database to a specified point in time, but must have the last valid backup before this point, and all related archive logs.
2. "Incomplete recovery" based on the SCN number
startup Mount;
Restore database until SCN 10000;
Recover database until SCN 10000;
ALTER DATABASE open resetlogs; "Resetlogs is only valid after incomplete recovery, incomplete recovery must be resetlogs/noresetlogs option to open data, reset archive log serial number starting from 1"
Note: This command restores the database to the state of the specified SCN number, but does not include the SCN number.
3. "Incomplete recovery" based on archived log serial number
startup Mount;
Restore database until sequence 123 thread 1;
Recover database until sequence 123 thread 1;
ALTER DATABASE open resetlogs; "Resetlogs is only valid after incomplete recovery, incomplete recovery must be resetlogs/noresetlogs option to open data, reset archive log serial number starting from 1"
Note: This command restores the database to the state of the specified archive log sequence number, and if the archive log list has breakpoints, it is easier to recover from this method, which means that we can only revert to the point where the breakpoint was started
If you restore database directly under open, you will report the following error
Channel ora_disk_1:reading from backup piece/home/oracle/backup/db_0fn7d50b, this backup block is the last backup to restore, automatically find in catalog library Prerequisite must be connected to catalog "
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR message STACK follows ===============
RMAN-00571: ===========================================================
Rman-03002:failure of Restore command at 04/04/2012 12:03:18
Ora-19870:error reading backup piece/home/oracle/backup/db_0fn7d50b error Read block
Ora-19573:cannot obtain exclusive enqueue for DataFile 4 cannot include exclusive data files 4 queues
Summary: General "instance recovery" with a lot of full recovery, "media recovery" with incomplete recovery.