Quantcast
Channel: CodeFari
Viewing all articles
Browse latest Browse all 265

Find the user who dropped database table

$
0
0

Once a table was missing from our database and my project manager ask to find to user who dropped the table I search on google and find the solution so I want to share my experience with you.


CREATEDATABASEmyTest
GO

USEmyTest
GO

CREATETABLETable1(IDINT)
GO

ALTERTABLETable1
ADDFirstColVARCHAR(100)
GO

DROPTABLETable1
GO


Run above query, it will create a database and table also alters the table after that it will delete the created table. We want see the changes history of this table, please follow the as given in below pic.




Once you click on schema changes history then you will found the following results




You can see the DDL operation history for table Table1.


Viewing all articles
Browse latest Browse all 265

Trending Articles