From: robert stearns on
Is there a default auto-commit done in sql procs? If so,how I disable it?
From: jefftyzzer on
On Oct 21, 2:15 pm, robert stearns <rstearns1...(a)charter.net> wrote:
> Is there a default auto-commit done in sql procs? If so,how I disable it?

I believe you have to turn it off within the session that invokes it
(before the invocation). If I had an SP that has explicit COMMITs that
I want honored over autocommit, I'd do the following (assuming the
invoking environment is the CLP:

db2 -tv +c

db2 => CALL MY_PROC();

-- OR --

db2 -tv

db2 => UPDATE COMMAND OPTIONS USING c OFF;
DB20000I The UPDATE COMMAND OPTIONS command completed successfully.
db2 => CALL MY_PROC();

--Jeff

From: Serge Rielau on
robert stearns wrote:
> Is there a default auto-commit done in sql procs? If so,how I disable it?
No, neither default nor otherwise.
You want commit you need to issue COMMIT.

--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab
From: Mark A on
"robert stearns" <rstearns1241(a)charter.net> wrote in message
news:KRKDm.13460$pl1.1944(a)newsfe01.iad...
> Is there a default auto-commit done in sql procs? If so,how I disable it?

There is no auto-commit within in the SP itself, but depending on what
interface you use (such as CLI) there may be an auto-commit done after the
call (just like any other SQL statement).