Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - IBM DB2  »  auto commit in sql procs...
Page 1 of 1    

auto commit in sql procs...

Author Message
robert stearns...
Posted: Thu Oct 22, 2009 1:15 am
Guest
Is there a default auto-commit done in sql procs? If so,how I disable it?
 
jefftyzzer...
Posted: Thu Oct 22, 2009 1:15 am
Guest
On Oct 21, 2:15 pm, robert stearns <rstearns1... at (no spam) charter.net> wrote:
Quote:
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
 
Serge Rielau...
Posted: Thu Oct 22, 2009 5:01 am
Guest
robert stearns wrote:
Quote:
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
 
Mark A...
Posted: Fri Oct 23, 2009 2:18 pm
Guest
"robert stearns" <rstearns1241 at (no spam) charter.net> wrote in message
news:KRKDm.13460$pl1.1944 at (no spam) newsfe01.iad...
Quote:
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).
 
 
Page 1 of 1    
All times are GMT
The time now is Sat Nov 28, 2009 3:03 am