| Computers Forum Index » Computer - Databases - IBM DB2 » auto commit in sql procs... |
|
Page 1 of 1 |
|
| 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? |
|
|
| Back to top |
|
|
|
| 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 |
|
|
| Back to top |
|
|
|
| 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 |
|
|
| Back to top |
|
|
|
| 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). |
|
|
| Back to top |
|
|
|
|