Results 1 to 2 of 2
  1. #1
    Senior Member cheffern's Avatar
    Join Date
    Mar 2005
    Massachusetts, USA
    Thanked 4 Times in 4 Posts

    Question 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!

  2. #2
    Member cfhoffmann's Avatar
    Join Date
    Jun 2005
    Sydney, Australia
    Thanked 0 Times in 0 Posts


    Since DB2 logs are stored as archives I'd try 'SELECT * FROM ARCHIVES WHERE ....' to get the log names, dates and object ids:

    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.

Similar Threads

  1. DB2 backups and archive logs...
    By Stephan in forum DB2
    Replies: 3
    Last Post: 06-30-2010, 03:48 PM
  2. How to recover db2 logs that are deleted
    By koganti in forum Restore / Recovery Discussion
    Replies: 3
    Last Post: 01-19-2008, 11:21 PM
  3. Backing up DB2 logs to disk
    By dank in forum DB2
    Replies: 6
    Last Post: 03-31-2007, 03:56 PM
  4. DB2 v8.2 logs to disk?
    By cheffern in forum TDP/Application Layer Backup
    Replies: 2
    Last Post: 09-12-2006, 08:01 AM
  5. DB2 userexit archiving DB2 archive logs
    By twillia in forum Backup / Archive Discussion
    Replies: 0
    Last Post: 02-10-2004, 05:25 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts