Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009

    Unanswered: Commit a Nested Stored Procedure

    I have an external Stored Procedure which calls a Sql Stored Procedure. It seems that a commit can not be apply in my sql Stored Procedure while the external stored procedure is not finished.

    I have explicity written the commit sentence in the sql Stored Procedure but does not work

    How can I tell the Procedure to behave independently from the object that calls it (program, external stored procedure, user function)?


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    Please supply your DB2 version and OS.

    How do you know it is not working?


  3. #3
    Join Date
    Dec 2007
    Richmond, VA
    Provided Answers: 5
    In a case like that you would have to kick off an asynchronous process, instead of calling your procedure. For instance use an MQ transaction, on the mainframe we would have a process start a batch job, so that the task is done separately or to kick off a CICS transaction, which would do the piece of work.

  4. #4
    Join Date
    Jan 2007
    Jena, Germany
    Adding to what dav1mo said, a stored procedure is like any regular function/method in an application: it executes in the context of the caller. For stored procedures, that means the same transactional context of the caller - it is as if your application would execute the logic in the procedure itself within the very same transaction.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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