MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2 table modification timestamp

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
KOUSIK
Beginner


Joined: 04 Jan 2005
Posts: 26
Topics: 13

PostPosted: Wed May 21, 2008 5:50 pm    Post subject: DB2 table modification timestamp Reply with quote

Hi,

Rows in a table were modified in our shop and this table doesn't have any timestamp column to capture the date and time of update. Is there anyway I can find out when exactly this table was modified for its data in terms of timestamp ?

Any thoughts is greatly appreciated!!!

Thanks,
Kousik
Back to top
View user's profile Send private message
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Wed May 21, 2008 8:15 pm    Post subject: Reply with quote

AFAIK, no way. Why dont you add a timestamp column in the table update it with current timestamp during UPDATE?
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu May 22, 2008 9:16 am    Post subject: Reply with quote

actually, if you have full logging on, you could (maybe) find out. ask your dbas. there maybe image copies, using these you can get a timeframe. (between tuesdays' image copy and wednesday's image copy).

you need a trigger associated with this table so that everytime a column is updated the trigger is executed and updates the ts column of the appropriate row.

while you are at it, add a userid and reason column that everyone can ignore.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu May 22, 2008 9:18 am    Post subject: Reply with quote

as an append to the previous comment.

unless the ts column is referenced in update sql, it will not be updated. that is why the suggestion of the trigger.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group