Database Reference
In-Depth Information
Let's take a look at the remaining information on the error.
SQL> SELECT :rman_error rman_error, :rman_msg rman_msg, :ora_error ora_error,
:wait_for_input wait_for_input
FROM dual;
Wait
RMAN ORA for
Error RMAN_MSG Error input
------ ------------------------------------------------------------ ------ ------
3009 RMAN-03009: failure of backup command on ORA_DISK_1 channel 19566 0
at 07/18/2007 17:13:55
The RMAN error at the top of the stack is RMAN-03009. This time, there is also an ORA-19566
error. The text of the ORA- nnnnn error is in the bind variable ORA_MSG :
SQL> SELECT :ora_msg "ORA-nnnnn error" FROM dual;
ORA-nnnnn error
-----------------------------------------------------------------------------------
ORA-19566: exceeded limit of 0 corrupt blocks for file F:\ORADATA\TEN\APPDATA01.DBF
The error message in bind variable ORA_MSG contains the name of the data file affected by
the block corruption. Retrieval of the data file name can easily be implemented by extracting
the string at the end of the error message. Knowing the name of the corrupted file, it is a breeze
to rerun the backup with a SET MAXCORRUPT setting that will allow the DBMS instance to complete
the backup.
SQL> BEGIN
:cmd:='run {
set maxcorrupt for datafile "F:\ORADATA\TEN\APPDATA01.DBF" to 10;
backup format "DB-%d-%u.bkp" tablespace appdata;
}';
:rv:=site_sys.rman_pipe_if.send(:pipe_arg, :cmd);
END;
/
PL/SQL procedure successfully completed.
SQL> PRINT rv
RV
---
0
Since there is only a single corruption in the data file, RMAN now signals success and
returns the name of the backup piece created.
Search WWH ::




Custom Search