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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Database name of a view and who modifed view

Author  Topic 

cornel
Starting Member

3 Posts

Posted - 2009-01-12 : 05:06:37
How can I find out (1) which database a modifed view comes from?
(2) who modified the view?

I am using SQL 2005 with the following SQL
SELECT [name], modify_date
, object_id , parent_object_id, schema_id
FROM sys.views
WHERE modify_date > DATEADD(day,-30,GETDATE())
ORDER by modify_date desc

Best Regards,
Cornel

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-12 : 09:04:20
quote:
Originally posted by cornel

How can I find out (1) which database a modifed view comes from?
You need to link to sys.databases
(2) who modified the view?
Look at schema change report in STD report

I am using SQL 2005 with the following SQL
SELECT [name], modify_date
, object_id , parent_object_id, schema_id
FROM sys.views
WHERE modify_date > DATEADD(day,-30,GETDATE())
ORDER by modify_date desc

Best Regards,
Cornel

Go to Top of Page
   

- Advertisement -