Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a SQL Server 2005 database that has been deleted, and I need to discover who deleted it. Is there a way of obtaining this user name?

Thanks, MagicAndi.

share|improve this question
2  
@Evan, This is NOT an ass-kicking exercise! In my enlightened company, we will offer the offending user an intense period of 're-education'. If that doesn't work, it time for the baseball bats... –  MagicAndi Jun 29 '09 at 15:13
    
+1 for using a cousin of a clue-by-four, still the most effective re-education process on the planet today. –  Avery Payne Jun 29 '09 at 17:45
    
@MagicAndi - Sorry-- just couldn't resist adding the tag after remembering it on the "Who dropped a table" question a couple of weeks back. smile –  Evan Anderson Jun 29 '09 at 18:31
1  
Is ass kicking really necessary? While it was a bad mistake, it was a mistake. Restore the backup. If one doesn't have a backup, perhaps the ass kicking should be refocused in to a backup and recovery model... –  Frank V Jul 7 '09 at 16:03
add comment

4 Answers

up vote 2 down vote accepted

If it's not there in the default trace still, see my answer to kind-of this question on ServerFault a couple of weeks ago at Is there any way to determine who dropped a table?. It links to a blog post I wrote for 2000, 2005, 2008 to find out when a table was dropped and who did it - you could adapt it for a database too. Checkout my blog post at Finding out who dropped a table using the transaction log.

Hope this helps!

PS Checkout DDL Triggers as a way to prevent this happening in future.

share|improve this answer
add comment

You might check the Schema Changes History under Standard Reports.

share|improve this answer
add comment

Did you checked the sql logs?

share|improve this answer
add comment

If you want to pay for it, there are a couple of products (Apex Log is one) that will read the transaction log (or log backups) and get information like this back.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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