View previous topic :: View next topic |
Author |
Message |
KOUSIK Beginner
Joined: 04 Jan 2005 Posts: 26 Topics: 13
|
Posted: Wed May 21, 2008 5:50 pm Post subject: DB2 table modification timestamp |
|
|
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 |
|
|
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
Posted: Wed May 21, 2008 8:15 pm Post subject: |
|
|
AFAIK, no way. Why dont you add a timestamp column in the table update it with current timestamp during UPDATE? |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu May 22, 2008 9:16 am Post subject: |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu May 22, 2008 9:18 am Post subject: |
|
|
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 |
|
|
|
|