Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    1

    Unanswered: SQL SERVER Stored Procedures

    Is there any application which can tell you the procedure called within a procedure.

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by sunitasingh
    Is there any application which can tell you the procedure called within a procedure.
    Just tell me why do you need that ?
    Last edited by rudra; 04-11-06 at 19:23.
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by sunitasingh
    Is there any application which can tell you the procedure called within a procedure.
    Once upon a long ago I wrote a query that approximated this... It worked reasonably well as long as the SQL Server system tables (specifically the ones that track object dependance) were kept up to date, and the code did not use dynamic SQL.

    The problem is that dependancies are slippery things... They tend to be difficult to track, so the system tables would slowly slip out of completeness (due to object co-dependancy, etc), and more and more dynamic code would creep in, making the queries less useful.

    As long as you can avoid co-depdenancy (where two or more SQL objects depend on each other), and have no dynamic code, this might be possible using system tables. With a sufficiently sophisticated Transact-SQL parser, you can probably resolve co-dependancies and detect dynamic SQL.

    I'm not sure that you can completely solve this problem.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •