Repository navigation
24. Restore and Recovery
a. Restore : The physical action of copying database files (datafiles,control_files,parameter files) from backup storage location back to the database server.
b. Recover : The process of updating restored database files by applying changes that occurred after the backup was taken.
c. Media recovery : A broad category of manual recovery triggered by a human administrator to fix a physical "media failure".
d. Complete Recovery : A specific type of media recovery that restores and updates the database up to the most recent transaction before the failure occurred.
SAFETY : restore and recover operations can overwrite the files, change database state,effect the application availability. Verify the database name,number,file,backup availability,archive log coverage.
select file#,online_status,error,change#,time from v$recover_file order by file#;
select file#,name,status,error,recover,checkpoint_change#,checkpoint_time from v$datafile_header order by file#;
here datafile 7 i choose

select thread#, sequence#, first_change#, next_change#, first_time, next_time, archived, deleted, status, name from v$archived_log order by thread#, sequence#;
select sid, serial#, opname, target, sofar, totalwork, units, round(sofar * 100 / nullif(totalwork, 0), 2) as pct_done, elapsed_seconds, time_remaining from v$session_longops where opname like '%RMAN%' and totalwork > 0 and sofar <> totalwork order by start_time
select session_recid, session_stamp, operation, status, start_time, end_time, object_type, output_bytes from v$rman_status where start_time > sysdate-1 order by start_time desc;
select item, sofar, total, units, timestamp from v$recovery_progress order by item;
select process, status, thread#, sequence#, block# from v$managed_standby order by process;
list backup of datafile 1; restore datafile 1 preview; list incarnation of database;
crosscheck archivelog all; catalog start with '/u05/oracle/archive' noprompt; list archivelog all;
One of more archived log required for recovery are unavailable.
list backup of archivelog from sequence &start_seq until sequence &end_seq thread 1;
select file#, error, change#, time from v$recover_file;
recover datafile $file_id;
Use the accompanning ORA-01110 message to identify the affected file, then map it with v$datafile and dba_data_files.
Confirm the file is offline in the correct mode and not part of system or active undo.
Restore the archived log from backup or copy it from another valid destination/standby then catalog it.
Note: Donot force OPEN RESETLOGS simply to bypass missing redo. That changes the recovery objective and may cause data loss. Escalate and obtain approval for incomplete recovery.