If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Table last updated

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-10, 10:26
blazer789 blazer789 is offline
Registered User
 
Join Date: Jun 2009
Posts: 221
Table last updated

Is there any way to determine when was the table last updated[inserted/updated/deleted] in db2 V9.5 ?
Reply With Quote
  #2 (permalink)  
Old 05-05-10, 11:54
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
db2audit or insert/update/delete trigger?
Reply With Quote
  #3 (permalink)  
Old 05-05-10, 12:23
blazer789 blazer789 is offline
Registered User
 
Join Date: Jun 2009
Posts: 221
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?
Reply With Quote
  #4 (permalink)  
Old 05-05-10, 13:08
MarkhamDBA MarkhamDBA is offline
Registered User
 
Join Date: Dec 2008
Location: Toronto, Canada
Posts: 381
...........
__________________
DB2 v9.5 ESE on AIX v6.1/ v9./10 on z/OS
Reply With Quote
  #5 (permalink)  
Old 05-05-10, 13:15
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
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.1.0.2 os 5.3.0.0
Reply With Quote
  #6 (permalink)  
Old 05-05-10, 22:20
blazer789 blazer789 is offline
Registered User
 
Join Date: Jun 2009
Posts: 221
I created a trigger which does that job. Thanks everybody
Reply With Quote
  #7 (permalink)  
Old 05-05-10, 23:53
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
We have UPDATE_TS column in important tables. Trigger updates this with current timestamp.
Reply With Quote
  #8 (permalink)  
Old 05-17-10, 02:39
haimdresler haimdresler is offline
Registered User
 
Join Date: Sep 2009
Location: Israel
Posts: 4
Rts

There is som information in the Real Time Statistics Catalog tables .
Reply With Quote
  #9 (permalink)  
Old 05-17-10, 04:42
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On