Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007

    Unanswered: How to tell if Tables are touched

    I'm using DB2 9.1 LUW with AIX 6.1. I have a list of tables that include LOBS, CLOBS, and BLOBS fields that I would like to know when the Tables with these fields have been last touched (selected/updates/deletes etc).

    Is there a way to do this from DB2 9.1 LUW? Maybe a Select statement or DB2 command?

    Thank you.


  2. #2
    Join Date
    Aug 2011
    Try below query:

    db2 " select substr(table_name,1,30) as tbname, rows_read, rows_written, overflow_accesses, page_reorgs from table (SNAPSHOT_TABLE('db_name',-1)) as snapshot_table order by rows_written desc fetch first 10 rows only "

    Harsh V

  3. #3
    Join Date
    Apr 2006
    Provided Answers: 11
    small remark :
    Note: This table function has been deprecated and replaced by the SNAPTAB administrative view and SNAP_GET_TAB_V91 table function - Retrieve table logical data group snapshot information
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5-V11 Fundamentals- DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  4. #4
    Join Date
    Aug 2001
    I think the OP wanted " when the Tables with these fields have been last touched " ..

    The query above tells whether the table was accessed since the last db activation.

    To the OP:
    There is no definitive way of telling when a table was last used. The lastused column in db2 9.7 is no gurantee.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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