Is it possible to get the user who last edited the stored procedure, function, table or view in SQL Server?

I'm not even sure that SQL Server stores this information, but is it possible to get the name of the user who last modified a particular stored procedure, function, table or view?

Nothing critical, just interesting. Thanks!

+6
sql-server-2008 history
source share
3 answers

If you are using SQL Server 2008, you can use some of the new features that allow you to introduce triggers in DDL changes. You can then track based on the authenticated user who made the change.

I think these triggers are new to SQL 2008, but they may be available in 2005.

Having said that, ideally you should have a database schema under source control, using a tool like Visual Studio Database Professional. Then you will have a complete story of who does what.

Randy

+1
source share

It does not store this information out of the box.

You can use the SQL trace and event notification (see the related MSDN article ) to log this kind of information yourself.

I have no experience with these technologies, though ...

+1
source share

Definitely set DDL triggers. Even if you don’t stop using them, or if you end up with a decent version control system, there are still DDL triggers so you can be sure of what's happening.

+1
source share

All Articles