Results 1 to 2 of 2
Thread: need query to locate DB2 logs
-
02-18-2011, 11:21 AM #1Senior Member
- Join Date
- Mar 2005
- Location
- Massachusetts, USA
- Posts
- 992
- Thanks
- 0
- Thanked 1 Time in 1 Post
need query to locate DB2 logs
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.
-
02-20-2011, 05:26 AM #2
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 by cfhoffmann; 02-26-2011 at 07:51 AM.
Chris
Similar Threads
-
DB2 backups and archive logs...
By Stephan in forum DB2Replies: 3Last Post: 06-30-2010, 03:48 PM -
How to recover db2 logs that are deleted
By koganti in forum Restore / Recovery DiscussionReplies: 3Last Post: 01-19-2008, 11:21 PM -
Backing up DB2 logs to disk
By dank in forum DB2Replies: 6Last Post: 03-31-2007, 03:56 PM -
DB2 v8.2 logs to disk?
By cheffern in forum TDP/Application Layer BackupReplies: 2Last Post: 09-12-2006, 08:01 AM -
DB2 userexit archiving DB2 archive logs
By twillia in forum Backup / Archive DiscussionReplies: 0Last Post: 02-10-2004, 05:25 PM


Reply With Quote
