How to identify particular table value is modified when?

Hi Experts,

 I've table called tBalance. For Player id 1040 the value IsVoid was 1 intially. Someone has updated this values as 0. How to ensure the customer that it was preiously one and now it is zero?

  Kindly advice.
LVL 16
Easwaran ParamasivamAsked:
Who is Participating?
 
Harish VargheseConnect With a Mentor Project LeaderCommented:
Hello,

If you do not have an earlier backup of the database where the value was 1 and if you are not maintaining an audit table for the changes, then the only solution may be to read from the transaction log (if you have NOT TRUNCATED the log after the update). If the log was cleared after the update was made, I doubt there may not be any way out.

Here is a blog that details how to read from transaction log.
http://raresql.com/2011/10/22/how-to-recover-deleted-data-from-sql-sever/

-Harish
0
 
lcohanConnect With a Mentor Database AnalystCommented:
My suggestion is to create a "audit" table if this is needed for any changed record and put a trigger on the parent OLTP table to populate the "Audit" table with all relevant info - who/when modified it, and what action - insert/update or delete?
0
 
Easwaran ParamasivamAuthor Commented:
The audit could implement now. But the question with the existing modified table which did not implement it. Is there no other way to track it?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Harish VargheseProject LeaderCommented:
Did you try reading from the transaction log? If the update had happened prior to last database backup, you may have to read from the transaction log of from the backup.

-Harish
0
 
Monica PSoftware DeveloperCommented:
To track the updates what i have used is ..

This in case if update is made from website :

I have written the function in .net code to track the logged user and his action (insert,update,delete) into another table...Using that table i can view the Action performed by that user.

to Track all updates  in that table .,
you can also  use trigger to write  a log in another table.,  to track the person & operation he done.

I not know this solution is best...just shared  my view...
0
 
Pankaj_401Connect With a Mentor Commented:
Not sure about how you will find earlier changes made in SQL server.
But if you have Change Data Capture enabled, you could have better chance to track all the changes made in SQL.
Also, check this MS-Library.
A good resource you can also explore here for further assistance.
0
 
Anthony PerkinsCommented:
Is there no other way to track it?
No.
0
 
Easwaran ParamasivamAuthor Commented:
Thanks.
0
All Courses

From novice to tech pro — start learning today.