Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Audit trail

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2007-02-06 : 13:26:01
Is there anyway I can find the value before the update process in the log files?

Somebody did update a column in the table and I am trying to find the privious value before it got updated?

anyway I can find this value in the log file or sys table? update statement?



X002548
Not Just a Number

15586 Posts

Posted - 2007-02-06 : 13:30:10
lumigent's log explorer, or you could implement your own data audit with history tables and triggers..I find it quite useful



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

jung1975
Aged Yak Warrior

503 Posts

Posted - 2007-02-06 : 13:31:49
is there anyway you can find the information in syscomments table?


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-06 : 13:42:58
quote:
Originally posted by jung1975

is there anyway you can find the information in syscomments table?






No. That's not what is in syscomments.

You'll need to read the transaction log via a third party tool. Lumigent and Red Gate are the vendors that I know of that have these tools. You will have to purchase the product to use it though as their trial versions only allow you to run against pubs or maybe it's Northwind.

Tara Kizer
Go to Top of Page

jung1975
Aged Yak Warrior

503 Posts

Posted - 2007-02-06 : 13:47:54
thanks.. by the way what is in syscomments table? i see alot of DML statments


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-06 : 13:52:04
Those are DDL statements in there, not DML.

Did you even bother checking SQL Server Books Online or should we be the ones to check the documentation for you? You've got enough posts here to know to check BOL first.

From BOL:

quote:

Contains entries for each view, rule, default, trigger, CHECK constraint, DEFAULT constraint, and stored procedure. The text column contains the original SQL definition statements, which are limited to a maximum size of 4 MB. This table is stored in each database.



Tara Kizer
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-02-06 : 14:08:20
Do you want help building your own audit trail?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-06 : 16:03:36
"Is there anyway I can find the value before the update process in the log files?"

Apart from 3rd party utilities like lumigent, if you are running Full Recovery model you could restore from backup to a point-in-time just before the errant Update (to a new/temporary database), and retrieve / review the data in that temporary database.

"Do you want help building your own audit trail?"

Looks like the horse has bolted already! but if it is still worthwhile closing the stable door:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Trigger,Triggers,audit%20changes

Kristen
Go to Top of Page
   

- Advertisement -