This article explains how users can customize the database repair
Automatic Application redo Log
1, the use of the set AutoRecovery command to automatically apply redo log, the completion of the data file repair operations.
Sql>startup MOUNT: Starts the instance and loads the database.
Sql>set AutoRecovery on: Enable the Redo Log auto Apply feature.
Sql>recover database: Restores specified tablespaces, data files, or entire databases.
Sql>alter Database open: When the restore is complete, the databases are opened.
2, the use of Recovery Automatic command to automatically apply the redo log, the completion of the data file repair operations.
Sql>startup MOUNT: Starts the instance and loads the database.
Sql>recover AUTOMATIC DATABASE.
Sql>alter Database open: When the restore is complete, the databases are opened.
II. database Media Recovery in non-archive mode
1, restore the database to the original location.
Sql>shutdown IMMEDIATE If the database is still open, shut down the database, restore the database file to its original location, and restore the entire database with the most recent consistent full backup, you must fix all the data files and control files.
SQL>RECOVER DATABASE UNTIL CANCEL
SQL>CANCEL
SQL>ALTER DATABASE OPEN RESETLOGS;
将当前重做日志顺序号设置为1。
Sets the current redo log order number to 1.
2, restore the database to a new location.
Sql>shutdown IMMEDIATE: If the database is still open, shut down the database, restore the database file to a new location, and restore the entire database with the last established consistent full backup, all data files and control files must be repaired; Edits the Control_files parameter in the initialization parameter file so that it performs the control file saved in the new location.
Sql>startup MOUNT: If the restored database file is in a new location, the control file must be modified with the ALTER DATABASE RENAME file statement to point to the repaired data file in the new location. Such as: