Does SQL store any information about who originally created a view, or who last modified it?
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!
I am not sure if there is a way to see who created the view but sp_help will get you some information on when it was created
sp_help viewMyView
sp_help works on any and all database objects BTW.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With