Question about nested stored procedure

  • I have a wrapper stored procedure which in turn calls other 10 procedures. In outer procedure I put print statements after each Execute S.P. statement with just number and timestamp. After it finished execution, I see only 6 print statements. No errors. If I execute 6th procedure separately, it executes without errors as well.

    This makes me to believe that somethow, under certain conditions, this 6th procedure terminates execution of all remaining stored procedures, from 7th to 10th. Is it possible at all ? How, by what keywords can I detect it? And if this is not a case, what other possible reasons could be that remaining print statements are missed. My outer procedure does not have anything like return.

    Thanks.

  • Hi

    Can you post the Wrapper procedure, Which is calling others(7-10)?

    Ali
    MCTS SQL Server2k8

  • For it to simply stop execution I'd expect an error or message of some sort. However, to try to figure it out, I'd wrap the statements in a TRY/CATCH block to see if you can return an error that way.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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