Full media recovery of database for Rman database recovery
Environment: Control files and parameter files SPFile and archive files, redo log files are all in. Other data files are missing.
Recovery method: Restore using a full-library backup created previously
1. Delete the data file:
SQL>SHUTDOWN IMMEDIATE; the database is closed. The database has been uninstalled. The ORACLE routine has been closed. SQL> HOST DEL D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01. Dbfsql> HOST DEL D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01. Dbfsql> HOST DEL D:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01. Dbf
2. Start the database to the load state
SQL>6472048642178536478151192 bytes Database 159383552 7491584 bytes Database is loaded.
3. Perform Rman recovery:
3.1 Connect Rman recovery directory and Target database:
C:\Users\Administrator>Rman Recovery manager: Release11.2.0.1.0 -Production onSunday December + -: -: + theCopyright (c)1982, the, Oracleand/orits affiliates. Allrights reserved. RMAN>CONNECT CATALOG rmanct/Rmanct@ORCL; RMAN-00571:===========================================================RMAN-00569:===============ERROR MESSAGE STACK follows===============RMAN-00571:===========================================================RMAN-04004: Warning from recovering the catalog database: ORA-01033: ORACLE is initializing or shutting Rman>CONNECT TARGET SYS/rusky2014@orcl; connected to target database: ORCL (DBID=1392118573, not open) use the target database control file instead of the recovery directory
3.2 Performing a recovery operation
RMAN> RESTORE DATABASE; startRestoreIn +-December- -Allocated channel: Ora_disk_1 Channel Ora_disk_1:sid=TenDevice type=DISKChannel Ora_disk_1: Starting restore data file backup set Channel Ora_disk_1: Specifying the data file channel to restore from the backup set ora_disk_1: Data file00001revert to D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01. DBF Channel Ora_disk_1: The Data file00002revert to D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01. DBF Channel Ora_disk_1: The Data file00003revert to D:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01. DBF Channel Ora_disk_1: The Data file00004revert to D:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01. DBF Channel Ora_disk_1: The Data file00005revert to D:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01. DBF Channel Ora_disk_1: The Data file00006revert to D:\RMAN_CATALOG\RMANTBS01. DBF Channel Ora_disk_1: Reading backup fragment D:\RMAN_BAK\FUL_BAK_20141221 Channel Ora_disk_1: Segment handle=D:\RMAN_BAK\FUL_BAK_20141221 Mark=tag20141221t134059 Channel Ora_disk_1: restored backup fragment1Channel Ora_disk_1: When the restore is complete:xx: on: inCompleteRestoreIn +-December- -
3.3 Performing a repair operation
RMAN>DATABASE-December -xx: xx:-December -
3.4 Opening a database
rman> ALTER DATABASE OPEN;
Database is open
===========================================
Note: The above operations are performed on the database in archive mode, if it is non-archive mode, before the restore command is executed, the previously backed up control file is restored, and the
After the restore and Recove commands, the database must be opened in open resetlogs mode.
Full media recovery of database for Rman database recovery