SQL 2005 Find Out Who Created a View

sql-server, sql-server-2000, sql-server-2005

Solution

It's too late now, but if you were using 2008 you could create an audit that will track future changes.

EDIT: found it!

    select p.name, v.* 
from sys.all_views v, sys.database_principals p, sys.schemas s
where p.principal_id = s.principal_id
and v.schema_id = s.schema_id
and v.name = 'your_view_name'

This will produce a number of interesting details about the views in your database, including the column principal_id. Join with sys.database_principals on principal_id for the username!

Problem

Does SQL store any information about who originally created a view, or who last modified it?

Original source