SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
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
 New Topic  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  
 New 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.05 seconds. Powered By: Snitz Forums 2000