Monday, June 9, 2014

Repair failure with preview

1.Repair failure with preview
RMAN> list failure;

List of Database Failures
=========================

Failure ID Priority Status    Time Detected Summary
---------- -------- --------- ------------- -------
548        HIGH     OPEN      09-JUN-14     Tablespace 4: 'USERS' is offline
542        HIGH     OPEN      09-JUN-14     One or more non-system datafiles are offline

RMAN> repair failure preview;

Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/orcl/oracle/diag/rdbms/cvrman/cvrman/hm/reco_1312477392.hm

contents of repair script:
   # online a offline tablespace
   sql "begin sys.dbms_ir.execsqlscript(filename => ''/u01/app/orcl/oracle/diag/rdbms/cvrman/cvrman/hm/reco_3578264930.hm'' ); end;";

RMAN> host 'cat /u01/app/orcl/oracle/diag/rdbms/cvrman/cvrman/hm/reco_3578264930.hm';

begin
/*Online Tablespace*/
execute immediate 'ALTER TABLESPACE USERS ONLINE';
end;
host command complete


No comments: