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 2008 Forums
 Transact-SQL (2008)
 Query

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-06-06 : 17:35:20
I am looking for a query which should gives object dependencies for the stored procedures.
The objects on which stored procedures depends.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-06 : 17:38:20
sp_depends?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-06-06 : 17:52:02
sp_depends doesn't provide the accurate results...

Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2012-06-06 : 17:55:52
how about using sys tables

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=173827&SearchTerms=sys


<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-06-06 : 17:56:48
Try this instead:
SELECT OBJECT_NAME(referencing_id), * FROM sys.sql_expression_dependencies
Go to Top of Page
   

- Advertisement -