dbaXchange.com


Database Resources
- RDBMS Server
-
Database Administration
-
Performance Tuning
- Backup and Recovery
-
Oracle Utilities

-
SQL and PLSQL
-
Network Administration
-
Client Applications
-
Miscellaneous Stuff

Oracle's technology Sites

http://technet.oracle.com

http://metalink.oracle.com

http://asktom.oracle.com/

http://www.oramag.com


Search this site or the web


Site search Web search powered by FreeFind



 

Category     : Database Resources -> Backup and Recovery

DB Version  : Oracle 8 / 8i / 9i

OS Details    : Sun Solaris9

 

Recovering from the loss or corruption of current and active redo log calls for incomplete database recovery. Incomplete recovery is recovery to a point in time to the past, before the media failure or corruption occurred. Three types of incomplete database recovery exists in oracle and they are change-based, time-based and cancel-based recovery. Please be aware that you will lose all data changes made to the database after the point to which the recovery was done. Also, the database needs to be in archivelog mode for the recovery to work.

Following steps need to be done in order to do the incomplete recovery:

Step 1:

Startup the instance but do not mount or open the database.

SQL> startup nomount

Step 2:

Query the database dictionary for the current redo log number. The database recovery will be done prior to this number:

SQL> select sequence# from v$log where status = 'CURRENT';

Step 3:

Restore all the datafiles from the most recent database backup. Do not restore the control files, redo log files or init files from the backup.

Step 4:

Perform incomplete recovery. Cancel-based recovery is probably the way to go even though it is a manual process. When oracle tells you that it is ready to apply the redo log sequence number that was obtained in step 2, cancel the recovery.

SQL> recover database until cancel;

Step 5:

Open the database and discard the current redo log information.

SQL> alter database open resetlogs;

Step 6:

If the redo log was corrupted or lost due to a media failure and the database does not have the minimum number of redo logs necessary for oracle to open the database then drop the redo group whose files were lost and recreate it prior to opening the database.

Step 7:

Take a full offline backup of the database and after the backup, make the database available to the users.