Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Getting the Update Date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Getting the Update Date
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Feb 11, 2010 1:06 pm    Post subject: Reply to: Getting the Update Date
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

Site Director


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

PostPosted: Thu Feb 11, 2010 8:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us