IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting the Update Date


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Feb 11, 2010 12:29 pm
Reply with quote

Hi,
I have a query to know.
I have few records that have been updated in my DB2 table. I would like to know who has updated that record and when it was been done? Is there any query that can tell us to know the date and the ID which has updated/inserted the data in the table?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 11, 2010 12:40 pm
Reply with quote

Probably by maintaining couple of columns like userid and time_updated in the table and update them along with updation\insertion of row
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Thu Feb 11, 2010 12:48 pm
Reply with quote

Thanks Sambhaji,
But unfortunately we do not have such column in the table as of now, we will make this change from now onward but I want to know the date in the current tale, which does not have such columns.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 11, 2010 1:06 pm
Reply with quote

very mild warning
Quote:
we will make this change from now onward

isn' t kind of late now icon_question.gif icon_biggrin.gif

usually the audit/tracking, security, availability are the cornerstones on which the development is based
in order to meet all the other application requirements

in other words it is easy to add a transaction amount to a balance
its a bit more difficult to design for continuous operation or full audit capabilities
audit/tracking ==> strong security and all that follows

reviewing the issue is from any point of view a MAJOR application redesign
simply adding a couple of columns is not enough!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 11, 2010 8:16 pm
Reply with quote

Hello,

You might talk with the dba and see if what you want can be found from the database transaction logs (data used for forward and backward recovery).

With several database systems there is an easy to use programming interface to process the log data. I do not know if there is an easy way with db2. . .

As Enrico mentions, to do this within the application is not a matter of adding a couple of columns. . . For example what if the problem update was done by Mary at noon, but Fred did some other update at 13:00. The update in the fields would be the 13:00 update by Mary which had nothing to do with the problem.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top