

$ dd of=/u01/oracle/DB11G/oradata/brij/users01.dbf bs=8192 conv=notrunc seek=147 corruption testġ6 bytes (16 B) copied, 0.000159796 s, 100 > ALTER SYSTEM FLUSH BUFFER_CACHE

ONLY FOR TESTING FIRST WE CREATED SOME DB BLOCK CORRUTION > SELECT header_block FROM dba_segments WHERE segment_name=’EMP’ So instead we will just recover the corrupt block and not the entire datafile.įor Oracle Database 10g or Oracle9i Database, use the blockrecover command to perform block media recovery.Īs for Oracle Database 11g or newer, we will use the recover datafile … block command as shown below: Now it would take significant effort and time to perform the traditional restore and recover of a large datafile. There can be a corrupt block in a large datafile in your database which RMAN can easily report. You are required to open your database with the open resetlogs command anytime you use a backup control file during a recovery operation.ĬASE 2: FEW BLOCKS IN DATAFILE ARE CORRUPT RMAN> restore controlfile from autobackup RMAN> restore database until time “to_date(’0 13:00:00′, dd-mon-rrrr hh24:mi:ss’)” RMAN> restore database until time ‘sysdate – 5′ You can also specify a point in time from which you want RMAN to restore an older backup. RMAN> restore database until restore point WEEKLY_BACK

If you’ve created restore points, then you can also use the restore point name RMAN> restore database until sequence 17 If you know the log sequence number that you want to restore up to RMAN> restore database until SCN 5634174 If you know the SCN in a backup piece that you want to restore from You can also tell RMAN to restore datafiles from a point in the past using the until clause of the restore command in one of the following ways:
#Oracle 10g rman restore how to#
How to use until clause with RMAN restore command RMAN> restore database from tag WEEKLY_BACK If you wanna restore form some specific backups which you tagged: When you open your database for use, Oracle automatically detects and re-creates locally managed temporary tablespace tempfiles. You don’t have to restore or re-create missing locally managed temporary tablespace tempfiles. If you want read-only tablespaces restored, then you must use the check readonly command. NOTE: By default, the restore command skips datafiles associated with read-only tablespaces. What about Read only and temporary tablespaces? RMAN will search through backup history until it locates a good backup or until it exhausts all possibilities. Remember that RMAN will look in older backups if it can’t find a backup piece or if corruption is detected. Media recovery complete, elapsed time: 00:00:09 Using target database control file instead of recovery catalogĬhannel ORA_DISK_1: SID=133 device type=DISKĬhannel ORA_DISK_1: starting datafile backup set restoreĬhannel ORA_DISK_1: specifying datafile(s) to restore from backup setĬhannel ORA_DISK_1: restoring datafile 00001 to /u01/oracle/DB11G/oradata/brij/system01.dbfĬhannel ORA_DISK_1: restoring datafile 00002 to /u01/oracle/DB11G/oradata/brij/sysaux01.dbfĬhannel ORA_DISK_1: restoring datafile 00003 to /u01/oracle/DB11G/oradata/brij/undotbs01.dbfĬhannel ORA_DISK_1: restoring datafile 00004 to /u01/oracle/DB11G/oradata/brij/users01.dbfĬhannel ORA_DISK_1: restoring datafile 00005 to /u01/oracle/DB11G/oradata/brij/example01.dbfĬhannel ORA_DISK_1: reading from backup piece /u01/oracle/DB11G/fast_recovery_area/BRIJ/backupset/2014_02_20/o1_mf_nnndf_TAG20140220T140141_9jdyt91f_.bkpĬhannel ORA_DISK_1: piece handle=/u01/oracle/DB11G/fast_recovery_area/BRIJ/backupset/2014_02_20/o1_mf_nnndf_TAG20140220T140141_9jdyt91f_.bkp tag=TAG20140220T140141Ĭhannel ORA_DISK_1: restored backup piece 1Ĭhannel ORA_DISK_1: restore complete, elapsed time: 00:01:45

Total System Global Area 1068937216 bytes All rights reserved.Ĭonnected to target database (not started) In this situation, we simply start up the database in mount mode, issue the restore and recover commands, and then open the database: You can perform a complete database-level recovery in this situation with either the current control file or a backup control file. You have all the redo required to recover the database datafiles.
#Oracle 10g rman restore archive#
You have access to all redo archive files generated after the backup was taken. Some of the database recovery scenarios are listed below.Ĭase 2: FEW BLOCKS IN DATAFILE GOT CORRUPTEDĬase 3: ONLY ONE DATA FILE IS LOST/CORRUPTEDĬase 4: ALL DATAFILES OF A TABLESPACE GOT CORUPTED/LOST It greatly simplifies backing up, restoring, and recovering database files. RMAN performs backup and recovery tasks on the databases and automates administration of the backup strategies.
