Dependency | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Dependency

I’d like to know if there’s a way to list all tables, views that are being used within a stored procedure. Thanks for your help. Ben
Refer to Bert’shttp://weblogs.sqlteam.com/brettk/archive/2005/04/28/4830.aspx blog. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
for a quicke and easy approach in Enterprise Manager (if you dont need to do it in code) right click the procedure, go all tasks, Display Dependancies… ‘I reject your reality and substitute my own’ – Adam Savage
Hi, <br />i have found a store procedure from Mr.Michael Hotek , Stored Procedure: find_fk_relations , sorry i forgot the location where i find , and you can use sp_depends ‘object’ to find dependency on that object but as you ask you need it for all Mr.Michael Hotek’s Stored Procedure: find_fk_relations works the way you want may be available at www.searchsqlserver.com <br /><br />[<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br />Regards<br /><br /><br /><hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote"><br /><blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by silktaiji</i><br /><br />I’d like to know if there’s a way to list all tables, views that are being used within a stored procedure. <br /><br />Thanks for your help.<br /><br />Ben<br /></blockquote><br /><br />Hemantgiri S. Goswami<br />[email protected]<br />"Humans don’t have Caliber to PASS TIME , Time it self Pass or Fail Humans" – by Hemant Goswami<br />
I found Brett’s solution is good enough than any other script. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>