Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Be responsible for your future
Enter the USA legally!

Visa, Green Card, Citizenship, Passport
Consultation Services








Oracle » Administration » DBA » Recovery

Recovering an Instance

     



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;


















Oracle : Related Topics

Oracle : Administration : Server Manager
Oracle : Administration : O/S Password Authentication
Oracle : Administration : Database Creation
Oracle : Administration : Tablespace Creation
Oracle : Administration : Increasing the size of a tablespace
Oracle : Administration : Rollback segments
Oracle : Administration : Adding a redo log file set
Oracle : Administration : Altering table storage
Oracle : Administration : Backing up data files
Oracle : Administration : Taking tablespaces offline
Oracle : Administration : Creating users
Oracle : Administration : DB Verify
Oracle : Administration : Clearing Log Files
Oracle : Administration : Moving Data Files
Oracle : Administration : Index Management
Oracle : Administration : Creating a Schema
Oracle : Administration : Enabling Archive Logging
Oracle : Administration : Updating statistics for a table or schema
Oracle : Administration : Killing Sessions
Oracle : Administration : Drop a table and deallocate space
Oracle : Administration : Dropping a Tablespace
Oracle : Administration : Restricted Mode
Oracle : Administration : Oracle Issues, Facts You Should Know

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2019 Stoltenbar Inc All Rights Reserved.