Tuesday, January 15, 2013

ORACLE RMAN - Data Recovery Advisor

Oracle 11g  RMAN - DRA (Data Recovery Advisory) :The Data Recovery Advisory is a tool that helps you to diagnose and repair data failures and corruptions. The tool can automatically repair diagnosed failures.

How to find which files need recovery and repair automatically using rman script ?
rman target /
RMAN> list failure;
RMAN> list failure [Failure ID#] detail;
RMAN>advise failure;
RMAN>repair failure preview;
RMAN>repair failure; (It will generate the script for repair.Do you want to execute - Yes or No?)

How to verification  after recovery ?
select name, open_mode, log_mode from v$database;
select max(sequence#) from v$archived_log;
check alert.log

How to detect and avoid corruption ?

1. DBVERIFY :
dbv file='+JDATA/JTEST/datafile/jtest.263.653950000' userid=j/pass

2. ANALYZE....VALIDATE STRUCTURE
analyze table table_name validate structure [cascade] [online];
analyze index index_name validate structure;

3.RMAN Validate:
RMAN>backup check logical validate database;
RMAN>backup check logical validate datafile 1;
RMAN>validate database;
RMAN>validate datafile 1;
RMAN>validate tablespace users;

4. RMAN block recovery:
RMAN> blockrecover datafile 7 block 5;
RMAN> blockrecover corruption list until time sysdate -1;

5. Corruption views:

select * from v$database_block_corruption;
select * from v$backup_corruption;
select * from v$copy_corruption;
 
DB_ULTRA_SAFE:
New parameter DB_ULTRA_SAFE=[OFF | DATA_ONLY | DATA_AND_INDEX] (default OFF) controls behavior of DB_BLOCK_CHECKING, DB_BLOCK_CHECKSUM, or DB_LOST_WRITE_PROTECT parameters in oracle 11gR2.

List of data failure:
1.Incorrect access permissions
2.Offline table-space
3.Physical corruptions - (block check-sum failures or invalid block header field)
4.Logical corruptions - (inconsistent dictionary, corrupt row piece, corrupt index entry)
5.Inconsistencies - (control file is older or newer than the data files and online redo logs)
6.I/O failures - (limit on the number of open files exceeded, channels inaccessible, network or I/O error)
Ref Doc ID - 465946.1, 762339.1 and  428570.1 for other corruption option




No comments:

Post a Comment