How to find the SP depends on

  • I am having a main SP name SP1 and I am using a sub_sp1 in SP1 Sp.

    and the same sub_sp1 has been used in another sp called SP2.

    I want the query to find SP1 and SP2 by using sub_sp1

    Thanks in advance.

  • You can query the text column of syscomments.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Yes we can get it from syscomments table. But my DB having more no of data and its taking more time to execute. can u tell any fatstest method for retriving the SPs?

  • In SQL 2005 you can query the DMV sys.sql_dependencies for dependent and depending objects.

    Another option is using the stored procedure sp_depends which will also work with SQL 2000.

    [font="Verdana"]Markus Bohse[/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply