RelationalDBDesign RelationalDBDesign


Catalog Maintenance   «Prev  Next»
Lesson 4 Use RMAN to reset a database
Objective Discuss the use of the reset command.

Use RMAN to Reset a Database

This lesson discusses why you might need to issue the reset database command and the syntax to do so.
Let us say your database failed and was recovered at some point in time. As a result, you may have performed an incomplete recovery of your database and would have issued an alter database open resetlogs command.
In this case, Recovery Manager cannot distinguish between your resetlogs[1] command and an inadvertent recovery of an old control file. In both cases, Recovery Manager knows that something is not right with your database. Thus, the reset database command will create a new incarnation record of your target database. The syntax for this is:

RMAN>reset database

Incarnation number

The incarnation number[2] is used to identify a version of the target database. This version number ensures that the correct archived and online redo log files are applied during a recovery of your target database.

Reset database to incarnation

If you issue the list incarnations command, you will get a list of all incarnation records for your database. One incarnation will be current, the others will not. Review the table below to check if you have the following output from a list incarnation of databasecommand:

DB KEY INC KEY DBNAME DBID CURR
1 10 ORACLE 1234567890 NO
1 100 ORACLE 1234567890 NO
1 1000 ORACLE 1234567890 YES

If it turns out that you have received any of the outputs indicated in the table, you can perform a reset command to restore the database back to version 10 by issuing the following command:

RMAN>reset database to incarnation 10

You will subsequently need to issue the appropriate restore and recover RMAN commands to recover the correct database files from incarnation 10.
The following graphic demonstrates the output from resetting your client's database, (orc2), to incarnation 1119, which is also the current incarnation.

Reset database to incarnation 1119;

Reset Oracle Database

Click the link below to read about resetting a database to a specific incarnation.
Reset Oracle Database
In the next lesson, you will learn how to use RMAN to resynchronize your target database.

[1] resetlogs: Used to reapply the archive log files to your database.

[2]Incarnation number: Unique number that is used to identify a version of the database.