Hello Oracle Database Admins!
In the last few months I came across that it would be a good idea to monitor rman backups and check if any file needs backup.
RMAN> report need backup;
--> Report ERROR if any records show up.
Aditionally I would like to monitor the following command:
RMAN> report unrecoverable;
--> Report ERROR if any records show up.
I do not want to parse the output of RMAN. So here is my question: Does anyone know a method to monitor these two commands using SQL and/or PL/SQL?
I know that RMAN just uses SQL and PL/SQL to get the result but an sqltrace just lead me into non-documented pl/sql funtions with encrypted code.
Best Answer
A) Oracle replied to my SR that it is not supported run the SQLs manually. This is not entirely correct but I expected something like that.
B) The second command
report unrecoverable
can be queried with SQL. The result is even more accurate than from RMAN.RMAN's
report unrecoveryble
will only report files which contain content which are unrecoveryble after the latest backup. This SQL reports unrecoverable things in general. Normally we do not try to make the database only recoverable after the latest backup.C) For both commands I wrote a "screen reader". Here are some code snippets: