MOHAMED DINAZ
Different Types of RMAN Recovery Steps: 1. Restoring and Recovering All Datafiles 2. Restoring Specific Tablespaces 3. Restoring Specific Datafiles 4. Restoring Control Files 5. Restoring Online Redologs 6. Time-Based, Change-Based, or SCN-based Incomplete Recovery 7. Recovering Archived Logs only
alter database open; When the restore command is executed, RMAN will automatically go to its last good backup set and restore the datafiles to the state they were in when that backup set was created. When restoring database files, RMAN reads the datafile header and makes the determination as to whether the file needs to be restored. The recovery is done by allocating a channel for I/O and then issuing the RMAN restore database command. NOTE: Full RMAN backup has to be taken after recovery is successfully completed
$ sqlplus /as sysdba SQL> alter database open; NOTE: Full RMAN backup has to be taken after recovery is successfully completed
SQL> alter database open; NOTE: Full RMAN backup has to be taken after recovery is successfully completed
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 07/11/2005 14:25:22 RMAN-06026: some targets not found - aborting restore RMAN-06023: no backup or copy of datafile 10 found to restore RMAN-06023: no backup or copy of datafile 9 found to restore RMAN-06023: no backup or copy of datafile 8 found to restore RMAN-06023: no backup or copy of datafile 7 found to restore RMAN-06023: no backup or copy of datafile 6 found to restore RMAN-06023: no backup or copy of datafile 5 found to restore RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06023: no backup or copy of datafile 3 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore RMAN-06023: no backup or copy of datafile 1 found to restore use the following directions to recover (recreate the controlfile): 1.With the database mounted, execute alter database backup controlfile to trace resetlogs; 2.Perform a shutdown abort on the database, but remain at the SQL> prompt. 3.In another telnet session, go to the udump directory to retrieve the resulting trace file and copy it to another location to edit it. 4.Edit the file and add the phrase until cancel to the recover database command at the end.The phrase should read recover database until cancel using backup controlfile. Remove the alter database open command after the recover command. Save the file with a .sql extension. 5.Back at the SQL> prompt, execute the modified trace file.When prompted for an archived log, type in cancel and the reply should be media recovery cancelled. 6.Issue alter database open resetlogs.The database should open after a few moments. 7.Connect to the RMAN recovery catalog and issue the reset databasecommand. 8.Perform a full RMAN backup as soon as possible.
--For SCN-based recovery, user these commands: Ex: $ sqlplus "/ as sysdba" SQL> shutdown immediate; SQL> startup mount; $ rman target / RMAN> restore database until scn 1000; RMAN> recover database until scn 1000; media recovery complete. SQL> alter database open resetlogs; --For change-based recovery, user these commands: Ex: $ sqlplus "/ as sysdba" SQL> shutdown immediate; SQL> startup mount; $ rman target / RMAN> restore database until sequence 9923; --Archived log sequence number RMAN> recover database until sequence 9923; --Archived log sequence number media recovery complete. SQL> alter database open resetlogs; Once the recovery has been completed, execute the following steps: > Delete prior backups with this command (from the RMAN prompt): RMAN> delete force backup; This command removes all prior backups from the RMAN catalog as they can no longer be used once the database has been restarted with the resletlogs option. After completing this command, create a new RMAN backup to establish a new baseline.
RMAN> restore ARCHIVELOG FROM TIME "to_date('07/11/05 00:00:01','MM/DD/YY HH24:MI:SS')UNTIL TIME 'SYSDATE';