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?
Sql-server – Determine Who Dropped a Database
sqlsql serversql-server-2005
sqlsql serversql-server-2005
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?
Best Answer
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.