It’s a very vast topic and people became very interested to know who has been deleted the database from their working environment , Here I am using an undocumented process to get the information from box very quickly and hope there will be not any incedent to using this command as its only select statement.
SELECT Operation, SUSER_SNAME([Transaction SID]) As UserName, [Transaction Name], [Begin Time], [SPID], Description
FROM fn_dblog (NULL, NULL) WHERE [Transaction Name] = ‘dbdestroy’
will return result as and Username here for further analysis.
good Script and it is working fine but in one case when you drop the database by T-SQL but if you deleted it from management studio by GUI it will not catch it
thanks for your sharing your information
LikeLiked by 1 person
Yes Dear, its true. Thanks a lot.
LikeLike
I tried this but I got only null values under the Username column. .your thoughts?
LikeLike
Hi Frank Boateng,
Thanks for your finding, Please let me describe your steps in details.
Thanking you,
Virendra
LikeLike
THANKS for this article but we can add the hostname() colone to identify the name of the post which was the Drop operation
LikeLike
I try deleting it from SSMS gui and still respond and found it, I do have a question since which versión and SP does this apply?
LikeLike
Hi Enrique Argüelles,
It will work when you delete your DB via T-SQL.
Thanks for observation.
Virendra
LikeLike