Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> how to auto commit in oracle?

how to auto commit in oracle?

From: Norman Dunbar <Norman.Dunbar_at_lfs.co.uk>
Date: Wed, 7 May 2003 08:14:50 +0100
Message-ID: <E2F6A70FE45242488C865C3BC1245DA703A49713@lnewton.leeds.lfs.co.uk>


Morning Xie,

in SQLPlus :

set autocommit on (turns it on,)
set autocommit off (turns it off.)

in OCI applications :

OCIStmtExecute(......, OCI_COMMIT_ON_SUCCESS);

The question has to be 'Why ?' though - you only want to commit when a complete transaction is finished, not after every SQL statement. Commit is quite expensive in resources remember and you should not commit unless absolutely necessary.

Cheers,
Norm.



Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar_at_LFS.co.uk
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com

-------------------------------------

-----Original Message-----
From: Xie Haifeng [mailto:xiehaifeng_at_hotmail.com] Posted At: Wednesday, May 07, 2003 7:55 AM Posted To: server
Conversation: how to auto commit in oracle? Subject: how to auto commit in oracle?

Hi all,
  I'm using oracle 8.1.7 on linux. And when I have executed a insert/delete/update statement in sqlplus, I must manually execute "commit"
command otherwise the other people can't see the modified data in their db
connection. Does it possible to change some configs and make oracle server
to commit transaction automatically?
  Thanks a lot.

xie. Received on Wed May 07 2003 - 02:14:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US