An incomplete recovery is the only option if backups are run periodically
on a cold instance. Complete recovery is possible if archive logging is enabled,
and backups are run while the database is active.
/* diagnose data file problem */
select * from v$recover_file ;
/* diagnose data file problem, by displaying tablespace info */
select file_id, file_name, tablespace_name, status
from dba_data_files ;
/* find archive log files */
select * from v$recovery_log ;
/* incomplete recovery #1 */
svrmgrl> shutdown abort
[[ In Unix copy data files from backup area to data directory(s). ]]
svrmgrl> connect;
svrmgrl> startup;
/* incomplete recovery #2 */
svrmgrl> shutdown abort;
svrmgrl> connect;
svrmgrl> startup mount;
svrmgrl> alter database rename file '/data2/ts05.dbf' to '/backups/ts05.dbf'
svrmgrl> alter database open;
/* incomplete recovery #3, for user error (i.e. drop table ) */
Note: archive logs must exist in LOG_ARCHIVE_DEST
svrmgrl> shutdown abort
[[ backup all files ]]
[[ restore required data file(s), using OS commands ]]
svrmgrl> connect;
svrmgrl> startup mount;
svrmgrl> recover database until time '2002-03-04:15:00:00' ;
svrmgrl> alter database open resetlogs;
/* complete recovery #1, for major recovery operations, closed instance */
Note: archive logs must exist in LOG_ARCHIVE_DEST
svrmgrl> shutdown abort
[[ backup all files ]]
svrmgrl> connect;
svrmgrl> startup mount;
svrmgrl> recover database ;
< or >
svrmgrl> recover datafile '/data4/ts03.dbf'
svrmgrl> startup open;
/* complete recovery #2, for major/minor recovery operations, open instance */
Note: archive logs must exist in LOG_ARCHIVE_DEST
svrmgrl> shutdown abort
[[ backup all files ]]
[[ restore corrupted data files, using OS commands ]]
svrmgrl> connect;
svrmgrl> startup mount;
svrmgrl> set autorecovery on ;
svrmgrl> recover tablespace ts03 ;
< or >
svrmgrl> recover datafile 4 ;
svrmgrl> startup open;
|
|