Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Finding out who deleted a column from a table?

Author  Topic 

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-10-15 : 05:45:54
sql server 2005.

Is there a system table or sp or whatever that I could look in that would show me who deleted a column from a particular table in one of our databases?

Thanks.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-15 : 06:14:56
No.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-10-15 : 06:29:11
Doh!

Any way of tracking/logging in case it happens again?
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-15 : 06:47:04
If it was a recent action, check the Schema Changes History in the Standard Reports.
It works of the default trace that starts automatically when SQL Server starts.
The log_*.trc files are in your LOG directory.

This may help you.

Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-15 : 07:06:41
SQL Server 2005 has DDL triggers that can be used to audit Data Definition Language code like altering a table.
Google for it and you'll find code samples - I use one on the DEV servers. Really useful for developers.
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2009-10-15 : 07:58:05
http://connectsql.blogspot.com/2009/07/create-ddl-changes-log.html
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-10-15 : 09:53:01
Thanks (all) I've created a method now via DDL_DATABASE_LEVEL_EVENTS on a trigger writing to a table.
Go to Top of Page
   

- Advertisement -