Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    101

    Unanswered: Nested Stored procedure question!

    Hi,
    i'm calling proc2, proc3 from proc1, as soon as proc1 initiates proc2 kicks in and after completion of proc2 only it will jump to proc3 and so on..right
    Please clarify on this.
    or it would be great if you refer to any manual which gives details aabout nested stored procedure execution criteria..
    any help is greately appreciated..
    thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm not sure that I understand your question, but a given spid (connection to SQL Server) is single threaded by default. Unless you go to considerable lengths to work around it, everything done by that connection will be done in the sequence given.

    Does that answer your question, or am I way off?

    -PatP

  3. #3
    Join Date
    Apr 2004
    Posts
    101
    Thanks for your immediate response Pat,
    Here is my question in detailed way...
    Let's say proc1 is calling two procs say proc2 and then proc3.. first proc2 executes and then proc3 executes right..i mean it is sequential...
    for some reason if proc2 fails, will proc3 continues execution or the whole process of executing proc1 fails?
    hope my explanation is ok..
    thanks

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    It depends on why the procedure fails. Some errors are statement_fatal, meaning that they only stop the current statement, others are batch_fatal, meaning that the whole batch stops immediately. There are a few errors that sit between these two degrees of impact, and they are harder to diagnose.

    -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
  •