HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

List DB2 backups

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
listbackupsdb2

Problem

Is there a way to list the DB2 backups? All I can find is 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

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 ONLY


if you're using tsm you could use

db2adutl query db DBNAME

Code 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 ONLY
db2adutl query db DBNAME

Context

StackExchange Database Administrators Q#36541, answer score: 5

Revisions (0)

No revisions yet.