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
 views and dependencies

Author  Topic 

tariq2
Posting Yak Master

125 Posts

Posted - 2011-09-28 : 10:10:54
Hi,

Is there an easy way to look at all the views and their
dependencies i.e. all the tables (including the joined tables)

I hope this is clear

Thank you in advance for your help on this

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-28 : 10:45:41
sp_depends

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

paultech
Yak Posting Veteran

79 Posts

Posted - 2011-09-28 : 10:49:25
Hi ,

select all views from system table "sysobjects "
where type is view
and get dependence for each view using system storedprocedure
"sp_depends"

SELECT name FROM sysobjects WHERE xtype = 'V'
EXEC sp_depends @objname = N'vw_aspnet_Applications' ;

good luck

paul Tech
Go to Top of Page
   

- Advertisement -