View previous topic :: View next topic
|
Author |
Message |
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Hi,
I need to know when a perticular table DB.TBALENAME last updated(i.e the the date/time when a last row added/deleted/updated in this table). As I do not have the timestamp column in the DB.TBALENAME table, I could not look into this table for date/time.
Can you please help me to get details?.
Regards,
Chandra |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
updatestatstime in Real time statistics tables gets updated about 30 minutes after the last update/insert/delete/reorg/load.
So if you want accuracy it's no good, but if you want to know the tables that haven't been touched in 3 months it can be useful.
In DB 9 there is also a (hidden) row change timestamp even when you didn't define a column for it, but I think it is actually pagechange.
SELECT ROW CHANGE TIMESTAMP FOR TAB , col1 FROM TAB |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Hi GuyC,
Thanks GuyC for the deyails. They are pretty useful.
Can you please provide me sample query for getting this. I have tried using query like above, but did not work. Can you please provide some more details on this?.
Regards,
Chandra |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Chandra,
what version of db2 is running on your machine? |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
We are using version 8.1 in our shop. Do we have any facility to get this details in version 8.1?.
Please advice.
Thanks & Regards,
Chandra |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
*deleted* |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sometimes it is really hard to pass them up! |
|
Back to top |
|
|
|