2

A client of ours has doubts that a user erased certain information from the database they are using. I know that the database can be audited by having SQL Server Profiler enabled, but in this case, there wasn't any tool enabled to do auditing.

My question is: is there a way to know if some user has committed a transaction on the database without having profiler enabled? Is there any forensic task that can be done to accomplish this?

Thanks.

9
  • Which backup strategy is used? Do you have full transaction log backups?
    – Heinzi
    Commented Feb 6, 2017 at 19:07
  • 1
    If it's a deletion, you can just make sure that the data isn't there anymore. That won't tell you when it was deleted or who did it though. Commented Feb 6, 2017 at 19:08
  • @RBarryYoung yes, i´ve already figured out that it is not so much that can be done just asking to see if there is something that i´m missing that can be used
    – NicoRiff
    Commented Feb 6, 2017 at 19:10
  • 1
    If you have a DataBase with Recovery model set Full, Use Apex log software. It is useful.
    – Jota Pardo
    Commented Feb 6, 2017 at 19:18
  • 2
    You should set up your own auditing through triggers, Profiler should not be used for auditing and should generally not be used in Production at all. Our audit tables capture the exact changes (old and new values) and the login of who did it, the application the change came from, and the datetime of the change.
    – HLGEM
    Commented Feb 6, 2017 at 19:55

1 Answer 1

4

If you have the full and transaction log backups, you can use a log reading tool like Quest Litespeed or ApexSQL Log Reader. (Disclaimer: I used to work for Quest.) Those read the full backup, then the logs, in order to build a chain of what happened. You can search for transactions by syntax, table name, etc, and generate undo scripts.

Here's the catch, though: if it was a shared login, like a SQL login where multiple people knew the password, you're going to have a tough time pinning down who did it.

1
  • I ´m gonna give it a try. Actually all the applications that are targetting to database are using ODBC connections with SQL login, so as you say it will be hard to catch. In the other hand if the deletion was using an external tool we might have some probabilitties on knowing what happened.
    – NicoRiff
    Commented Feb 6, 2017 at 19:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.