Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: Table last updated

    Is there any way to determine when was the table last updated[inserted/updated/deleted] in db2 V9.5 ?

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    db2audit or insert/update/delete trigger?

  3. #3
    Join Date
    Jun 2009
    Posts
    272
    our application team wants a query to determine that. They obviously cannot get that from the db2audit. Do you mean to create triggers at application end upon insert/update/delete on that table?

  4. #4
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    ...........
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  5. #5
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    It depends on the purpose of the table, how it is used, who is updating it

    Things like adding update, create tmstamp columns to a table; If it is updated by some script, store output from that script. These two are just a start. You have to cookie cater to your needs, or disclose them on here.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  6. #6
    Join Date
    Jun 2009
    Posts
    272
    I created a trigger which does that job. Thanks everybody

  7. #7
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    We have UPDATE_TS column in important tables. Trigger updates this with current timestamp.

  8. #8
    Join Date
    Sep 2009
    Location
    Israel
    Posts
    4

    Rts

    There is som information in the Real Time Statistics Catalog tables .

  9. #9
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Quote Originally Posted by haimdresler View Post
    There is som information in the Real Time Statistics Catalog tables .
    May I have name of these tables , or any reference.

    thanks

Posting Permissions

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