Oracle rman catalog backup and recovery, rmancatalog
1. Lost control file
Start the database to nomount: restore controlfile from autobackup/restore controlfile from '+ data/backup/contrlbak /...'
-> Alter database mount-> open;
2. Accidentally deleting data files
Start to mount status-> alter database datafile 7 offline-> alter database open-> restore datafile 7-> recover datafile 7-> alter database datafile online;
3. Missing parameter files
In this case, the parameter file is lost, and the database is registered based on DBID in catalog, which cannot be identified at this time.
Export ORACLE_SID = orcl1-> rman target/-> restore spfile from '+ data/autobackup/2015_11_27/s_896863604.1824.896863605'
-> Shutdown immediate;
Then you can connect to the catalog and perform other restoration. Finally, you must execute restore database and recover database, and finally alter database open resetlogs to open the database.
4. recover database definition
The recover database is completely restored. That is to say, the archived and online logs of log files must be intact, and data files and control files must be fully prepared! If online logs exist
If the archive log is damaged or the archive log is missing, it cannot be completely restored! Recover database using backup controlfile... or until cancel; then
Resetlogs is enabled. If not, it is opened with an implicit parameter!
5. alter database open resetlogs
Open resetlogs should reset the log to make the database's scn and checkpoint consistent. It is equivalent to "formatting" all online logs ". This will cause data loss.
The resetlog option is used for Incomplete recovery. The archived log sequence number is sorted again.
Use noresetlog for full recovery
6. Restoration Based on Time points
SQL> set time on;
This mainly refers to the selection of recovery time points;
Start to mount status
RMAN-> run {
Set until time "to_date ('2017-01-17 09:54:33 ', 'yyyy-mm-dd hh24: mi: ss ')";
Restore database;
Recover database;
}