RE: Db2 find last record inserted

RE: Db2 find last record inserted

 

  


If you are using V8.1 then the equivalent is SNAPSHOT Table functions. Following is a good link to get started.

I guess SNAPSHOT_TABLE function should satisfy to a certain extent what you are looking for.

http://www-128.ibm.com/developerworks/db2/library/techarticle/0305deroos/0305deroos.html

Asking the end user should be your last option !!:((


-----Original Message-----
From: Sachin Kumar
[mailto:db2udbdba-ezmlmshield-x65787018.[Email address protected]
Sent: 20 December 2004 10:53
To: LazyDBA Discussion
Subject: RE: Db2 find last record inserted


thanks for response.

in oracle we can this via

Select * from v$sql

i want to know if there any such view / table

regards
Sachin

-----Original Message-----
From: Praveen Chengalathu
[mailto:db2udbdba-ezmlmshield-x68781475.[Email address protected]
Sent: Monday, December 20, 2004 4:20 PM
To: LazyDBA Discussion
Subject: RE: Db2 find last record inserted


You need to implement an audit trail mechanism like
1. Adding a (generated) timestamp column to your tables.
2. Implement triggers to track the inserts,updates or deletes.
3. If it is a one of affair then try using event monitor for
statements,transactions.



-----Original Message-----
From: Sachin Kumar
[mailto:db2udbdba-ezmlmshield-x29346911.[Email address protected]
Sent: 20 December 2004 10:35
To: LazyDBA Discussion
Subject: Db2 find last record inserted


Hi All,

I have a Db2 UDB 8.1 databse with around 180 tables. One of my user
inserts a row in a certain table. How can i find out which table and
which row has been updated ? Which table/view should be queried ??

regards
Sachin


---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


DB2 & UDB email list listserv db2-l LazyDBA home page