question

askmlx121 avatar image
askmlx121 asked

when was table one column removed from table in sql??

I want to know when was one column removed from table in sql? what time? is it possible???
tsql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image
JohnM answered
Assuming that nothing else changed in the table, you can use the default trace to help determine this, to a point. The trace won't explicitly tell you the exact command (not that I found anyway), but it will tell you that the table was altered. Look for EventClass = 164, which is the 'Object:Altered'. The ObjectName column will tell you the table name that was altered. http://blogs.technet.com/b/beatrice/archive/2008/04/29/sql-server-default-trace.aspx Hope this helps!
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DharmanDave avatar image
DharmanDave answered
Alternately you can also check the 'Schema Changes History' report of the Database. Right Click on the Database--> Reports --> Standard Reports --> Schema Changes History. This will also give you the user executing the command. Hope this helps...
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image JohnM commented ·
+1 Very nice! I always seem to forget about those standard reports. ;-)
2 Likes 2 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
+1 This report reads from the default trace, so it's a nice easy way of getting the data out
1 Like 1 ·
askmlx121 avatar image
askmlx121 answered
yes dhamandave you are right............ and thanking you johnmorehouse.......
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DharmanDave avatar image DharmanDave commented ·
Glad to know it helped :) It would be helpful if you mark the answer as correct so that it could assist others for future reference. Thanks... Cheers !
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.