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

Home -> Community -> Usenet -> c.d.o.misc -> Re: psql commit

Re: psql commit

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 2 Mar 2006 14:10:36 -0800
Message-ID: <44076d5c$1@news.victoria.tc.ca>


DA Morgan (damorgan_at_psoug.org) wrote:
: tony wrote:
: > I would like to know when exactly the implied commit takes place in a
: > plsql block.
: >
: > for example:
: >
: > BEGIN
: >
: > if flag is 'Y'
: > update table a set ......
: > end if
: >
: > send email to someone yada, yada...
: > do some html stuff...
: >
: > END
: >
: > I'm wondering if I can be sure the commit takes without explicitly
: > coding it if something goes wrong after the sql part but before the
: > END.

: What implied commit? This is Oracle. There is no such thing.

Eh?

How about SQL*PLUs SET AUTOCOMMIT .

Or perhaps some quotes from stanford.edu, not sure if the original source is oracle, but has always been reliable for me

"Oracle automatically issues an implicit COMMIT before and after any SQL DDL (Data Definition Language) statement (even if this DDL statement fails) ."

That same document

"Note though that Pro*C doesn't support the AUTOCOMMIT option whereas JDBC does and it has a default AUTOCOMMMIT option set to ON. Thus a programmer needs to execute COMMIT/ROLLBACK statements in Pro*C whereas in JDBC a user can make use of the AUTOCOMMIT and never specify explicitly where a transaction starts or ends. For more details, see the respective sections: Pro*C, JDBC."

I have no idea how those would interact with the original plsql example. Received on Thu Mar 02 2006 - 16:10:36 CST

Original text of this message

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