Rolling Back a Database
To roll back a database, for example, after a logical error has occurred:
-
Ensure that the database is offline. You can use the VxDBA utility to display the status of the database and its tablespaces, and to shut down the database:
- Select 2 Display Database/VxDBA Information to access the menus that display status information.
- Select 1 Database Administration > Shutdown Database Instance to shut down a database.
-
Select 4 Storage Rollback Administration > Roll Back the Database to a Storage Checkpoint in the VxDBA utility, and choose the appropriate Storage Checkpoint. This restores all data files used by the database, except redo logs and control files, to their state at the time that the Storage Checkpoint was made.
-
Start up, but do not open, the database instance by selecting 1 Database Administration > Startup Database Instance in the VxDBA utility.
-
Use one of the following commands to perform an incomplete media recovery of the database:
- Recover the database until you stop the recovery:
recover database until cancel;
...
alter database [database] recover cancel;
- Recover the database to the point just before a specified system change number, scn:
- Recover the database to the specified time:
- Recover the database to the specified time using a backup control file:
recover database until time 'yyyy-mm-dd:hh:mm:ss' using \
backup controlfile;
Note
To find out when an error occurred, check the ../bdump/alert*.log file.
See the Oracle documentation for complete and detailed information on database recovery.
-
To open the database after an incomplete media recovery, use the following command:
-
Perform a full database backup, and use the VxDBA utility to remove any existing Storage Checkpoints that were taken before the one to which you just rolled back the database. These Storage Checkpoints can no longer be used for Storage Rollback. If required, use the VxDBA utility to delete the old Storage Checkpoints and to create new ones.
|