need query to locate DB2 logs

cheffern

ADSM.ORG Senior Member
Joined
Mar 9, 2005
Messages
1,002
Reaction score
7
Points
0
Location
Massachusetts, USA
Website
Visit site
hi all -

have a customer asking if there will be a way using new DB2 log management auto archive logs from node --> TSM diskpool --> tape to find out where exactly a log is at a given point in time.
so basically the customer wants to know if there is a query we can run to be able to grab the info on a log and see where it is (is it on the node? is it on the TSM diskpool? or is it on tape?).
my first thought of course was db2adutl query - but I don't think we can get that level of detail...
on the server side the logs would be stored as 'objects' to TSM's knowledge, right?
so how would one be able to get this info - one log or even a group/range of DB2 logs and where they are?

thanks in advance for any / all stabs at this!
-Chef.
 
Since DB2 logs are stored as archives I'd try 'SELECT * FROM ARCHIVES WHERE ....' to get the log names, dates and object ids:

NODE_NAME: BIGSERVER_DB2
FILESPACE_NAME: /INDEXDB
FILESPACE_ID: 1
TYPE: FILE
HL_NAME: /NODE0000/
LL_NAME: C0000000_S0003611.LOG
OBJECT_ID: 1478716952 <--------------------
ARCHIVE_DATE: 2010-01-25 21:10:22.000000

and then using the object id run 'show bfo 0 1478716952' to show you the primary and copy stgpool volumes the DB2 log is actually stored on:

Bitfile Object: 0.1478716952

**Archival Bitfile Entry
Bitfile Type: PRIMARY Storage Format: 22
Bitfile Size: 0.22977590 Number of Segments: 1
Storage Pool ID: 20 Volume ID: 15384 Volume Name: XX0429 <------
**Archival Bitfile Entry
Bitfile Type: COPY Storage Format: 22
Bitfile Size: 0.22977590 Number of Segments: 1
Storage Pool ID: -4 Volume ID: 20435 Volume Name: AA0528 <------
 
Last edited:
Back
Top