Home » RDBMS Server » Backup & Recovery » sql query for RMAN catalog database to report SID and last successfull backup
sql query for RMAN catalog database to report SID and last successfull backup [message #173835] |
Wed, 24 May 2006 14:57  |
rajpura
Messages: 3 Registered: May 2006
|
Junior Member |
|
|
I am trying to write a SQL query against my catalog database which has over 770+ databases registered to report SID, start_time,end_time,status of the last successfull completed backup and unable to get what i need.
1) First I tried to get it from rc_rman_status and did not get the 770+ list of databases. Then compared and ran another query against rc_databases and got back 770+. So what is the purpose of rc_rman_status view ANYONE??
2) Wrote another query and joined rc_database and rc_backup_set but get too many rows for one DBID and unable to group start_time and end_time. I thought rc_backup_set has single set info but returns rows as if it a piece. Try yourself
3) Oracle recommends to use centralized catalog repository but I have yet to see any good reporting tools or queries from RMAN catalog database. I don't want to use RMAN list, report commands because we have 770+ database
Apprciate if anyone can test his/her query against their current catalog and let me know if it works as below
SID START_TIME END_TIME STATUS
============================================
ABC 25-MAY-2006 26-MAY-2006 AVAILABLE
XYZ 23-MAY-2006 24-MAY-2006 NO BACKUP
Thanks in advance
|
|
|
Re: sql query for RMAN catalog database to report SID and last successfull backup [message #176973 is a reply to message #173835] |
Mon, 12 June 2006 04:58   |
Frank Naude
Messages: 4596 Registered: April 1998
|
Senior Member |
|
|
1) According to the Recovery Manager Reference guide:
"This view contains information about the history of RMAN operations on all databases associated with this recovery catalog. It contains essentially the same information as V$RMAN_STATUS, except that it does not contain information about current sessions.
All RMAN operations such as backups, restores, deletion of backups, and so on are logged in this table. The table is organized to show the status of each RMAN session (the invocation of an RMAN client, including all actions taken until the RMAN client exits), operations executed during the session, and recursive operations."
2) The data looks right to me:
SQL> SELECT db_name, row_type, start_time, end_time, operation, status, mbytes_processed
2 FROM rc_rman_status
3 WHERE db_name = 'ORCL'
4 AND start_time > SYSDATE - 1
5 ORDER BY END_TIME
6 /
DB_NAME ROW_TYP START_TIM END_TIME OPERAT STATUS MBYTES_PROCESSED
-------- ------- --------- --------- ------ --------- ----------------
...
ORCL COMMAND 12-JUN-06 12-JUN-06 BACKUP COMPLETED 1.97998047
ORCL SESSION 12-JUN-06 12-JUN-06 RMAN COMPLETED 16
ORCL COMMAND 12-JUN-06 12-JUN-06 BACKUP COMPLETED 16.5478516
ORCL SESSION 12-JUN-06 12-JUN-06 RMAN COMPLETED 0
ORCL COMMAND 12-JUN-06 12-JUN-06 BACKUP COMPLETED .468261719
ORCL SESSION 12-JUN-06 RMAN RUNNING 0
ORCL COMMAND 12-JUN-06 BACKUP RUNNING 0
3) I fully agree - a better tool would be great!
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Jun 13 16:37:26 CDT 2025
|