Oracle RMAN recovery to an earlier time in the past
If you accidently dropped a table, a schema, or a data file, and you want to restore the entire database to an earlier time, here is what you should do:
1, Log in to RMAN
rman catalog rmancrm/rman@rman target sys/xxx@crm
2, Shutdown and startup mount database
shutdown immediate;startup mount;
3, Restore and recover.
run
{
SET UNTIL TIME “to_date(’15-04-2007 05:00:00′,’dd-mm-yyyy hh24:mi:ss’)”;
RESTORE DATABASE;
RECOVER DATABASE;
}
4, Alter database open resetlogs.
alter database open resetlogs;
5, Do a full database backup.
Popularity: 1%


















































