You can find which media tapes have the latest RMAN backup with the following query:
SELECT RECID, STAMP, SET_STAMP, SET_COUNT, PIECE#, DEVICE_TYPE, HANDLE, MEDIA,
To find the distinct tapes use:
SELECT RECID, STAMP, SET_STAMP, SET_COUNT, PIECE#, DEVICE_TYPE, HANDLE, MEDIA,
STATUS, DELETED, START_TIME, COMPLETION_TIME, BYTESWhere SID is the database SID, for example A7
FROM GV$BACKUP_PIECE
WHERE HANDLE LIKE '%ORACLE%SID%'
AND TRUNC(START_TIME) > TRUNC(SYSDATE-6)
ORDER BY START_TIME DESC;
To find the distinct tapes use:
SELECT DISTINCT(MEDIA) FROM GV$BACKUP_PIECE
WHERE HANDLE LIKE 'ORACLE%A7%'
AND TRUNC(START_TIME) > TRUNC(SYSDATE-7);
Apps DBA Free Lance,
Sukhwinder Singh
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.