Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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 Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us