Views expressed here are solely that of my own. Please make sure that you test the code/queries that appear on my blog before applying them to the production environment.

Saturday, June 18, 2011

Monitoring last RMAN backup log in target Oracle database in Oracle 10g

You can use two simple SQL commands to monitor the last RMAN backup log in target Oracle database without using RMAN catalog database in Oracle 10g.

The information in "v$rman_status" comes from the target database controlfile, showing one record for every RMAN command executed in RMAN backup script.

select * 
from v$rman_status 
where session_recid = (select max(session_recid) from v$rman_status) 
order by recid;

The information in "v$rman_output" comes from the target database memory and is not stored in target database controlfile, showing all the output as seperate records for every RMAN command executed in RMAN backup script.

In a single server database you should use "v$rman_output", if you have a RAC database you should use "gv$rman_output" dynamic view instead.

select * 
from v$rman_output 
where session_recid = (select max(session_recid) from v$rman_status) 
order by recid ;

No comments: