question

Pratikc5 avatar image
Pratikc5 asked

Read ldf to know who has changed the database

Recently, One of our database has been updated with some known values, which only a known person in the team can do...and as usual, no body in development team is accepting that, so we need to track who has done it...It's very important for us. I tried to explore that db with apex tools but it doesn't gave me required result...So I need to know is there any way or tool present to track who has done this???
sql-server-2008auditchange-tracking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JohnM avatar image
JohnM answered
Assuming that your trace files haven't rolled over yet, you might be able to find some of the information your looking for there. The code below will find the default trace location for the instance and then output all of the trace files that you have. DECLARE @trace VARCHAR(500) SELECT @trace=CAST(value AS VARCHAR(500)) FROM ::FN_TRACE_GETINFO(DEFAULT) WHERE traceID = 1 AND property = 2 SET @trace = (SELECT LEFT(@trace, CHARINDEX('log_',@trace,1)-1)+'log.trc') SELECT * FROM ::FN_TRACE_GETTABLE(@trace,DEFAULT) If the log files have already rolled over and you don't have any type of auditing configured, I don't know of a way to get that information. You can view the physical log file, however I don't believe that it will contain the user information. Hope this helps!
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.