Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How did my database security fail?

In a couple of my tables in my SQL Server 2005 database all of my data has been erased. Is there anyway to get a log in SQL Server of all the statements that have ran in the past day? I am trying to find out if someone did this on accident, there is a vulnerability in my web app, or the actual DB has been compromised.

like image 305
Jason Avatar asked May 22 '09 15:05

Jason


2 Answers

You're looking for the transaction log. Depending on how, and if, it is setup, you'll be able to see what was run. There some info on it at http://www.databasedesign-resource.com/sql-server-transaction-log.html. Given that, I'm sure you can also Google some better resource.

like image 62
Jeff Ferland Avatar answered Sep 18 '22 00:09

Jeff Ferland


You could also try running the command DBCC LOG(database,3). It will output the data that is in the transaction log.

like image 41
omockler Avatar answered Sep 19 '22 00:09

omockler