Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Check if a view is used in a SP
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

United Kingdom
68 Posts

Posted - 11/20/2012 :  03:26:54  Show Profile  Visit richardlaw's Homepage  Reply with Quote

I've recently started using SP's, and quickly written quite a few. I now need to check if a view ('dbo.usp_Members' for example) is used in any of my SP's.

What's the best way to do this? Can I use Management Studio, or another software application? Or can it be coded?

Thanks as always

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 11/20/2012 :  03:36:55  Show Profile  Reply with Quote
you can use sp_depends procedure like

EXEC sp_depends 'usp_members'

or query catalog view INFORMATION_SCHEMA.ROUTINES , sys.sql_modules like in below link

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000