While testing RMAN cloning I accidently deleted the target database. To resolve this I restored from a backup with a current control file. I still had to reset the logs. Copied snapshot control file to controlfiles Startup mounted database Found SNC # select max(next_change#) from v$log_history; or col db_name format a9 col SEQUENCE# Heading SEQ# col SEQ# format 999 select i.DBID ,a.DB_KEY ,a.DBINC_KEY ,a.DB_NAME ,SEQUENCE# ,a.FIRST_CHANGE# ,a.NEXT_CHANGE# ,a.COMPLETION_TIME ,a.STATUS from RC_ARCHIVED_LOG a , rc_database_incarnation i where a.DBINC_KEY = i.DBINC_KEY and i.CURRENT_INCARNATION='YES' and i.DBID=2386221693 order by SEQUENCE# Used script to recover: connect catalog rman/rman9@rman connect target rman/rman9@tcmdb # # Author: Monique Underwood # run { allocate channel D1 type DISK; set until SCN 27818600; restore database; recover database; } ## ## If recovery was successful then alter database open resetlogs; Don’t forget to add the temp tablespace if it is missing Recover_DB_SCN.log |
---|