patternMinor
List DB2 backups
Viewed 0 times
listbackupsdb2
Problem
Is there a way to list the DB2 backups? All I can find is
Edit: I am using DB2 9.7 on AIX with TSM
db2 list history backup all for but I think you need to check through all of those to see if they've since been deleted. This seems like a simple question but I'm coming up blank.Edit: I am using DB2 9.7 on AIX with TSM
Solution
using this SQL you could query in an easy manner the history file
if you're using tsm you could use
SELECT start_time, entry_status, operation, operationtype, backup_id,
devicetype, OBJECTTYPE
FROM SYSIBMADM.DB_HISTORY
WHERE operation in ('B','R')
ORDER BY start_time DESC FETCH FIRST 30 ROWS ONLYif you're using tsm you could use
db2adutl query db DBNAMECode Snippets
SELECT start_time, entry_status, operation, operationtype, backup_id,
devicetype, OBJECTTYPE
FROM SYSIBMADM.DB_HISTORY
WHERE operation in ('B','R')
ORDER BY start_time DESC FETCH FIRST 30 ROWS ONLYdb2adutl query db DBNAMEContext
StackExchange Database Administrators Q#36541, answer score: 5
Revisions (0)
No revisions yet.