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 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:
The incarnation number 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:
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 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.
resetlogs: Used to reapply the archive log files to your database.
Incarnation number: Unique number that is used to identify a version of the database.