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: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: Fri, 3 Mar 2006 14:38:02 +0000
Message-ID: <VyFwOJGKTFCEFwL6@jimsmith.demon.co.uk>


In message <pan.2006.03.02.22.01.59.382670_at_telus.net>, HansF <News.Hans_at_telus.net> writes
>On Thu, 02 Mar 2006 16:27:58 -0400, tony wrote:
>
>> I would like to know when exactly the implied commit takes place in a
>
>The 'implied commit' is actually in the host tool, not in PL/SQL. If you
>run SQLPLus and Autocommit is 'ON', then the implied commit will happen
>coincident with a disconnect.

Surely AUTOCOMMIT in SQL*Plus issues a commit after every statement?[1]

There is then a sneaky commit at disconnect regardless of the AUTOCOMMIT setting.

[1]The original poster should note that a PL/SQL block counts as a single statement in sqlplus so in his example the implied commit would be either

  1. After his END; if autocommit is on or
  2. When his SQL*Plus session ends.

In JDBC autocommit is on by default, other clients have different rules.

Guideline: Disable any autocommit settings and use explicit commits.

-- 
Jim Smith
I'm afraid you've mistaken me for someone who gives a damn.
Received on Fri Mar 03 2006 - 08:38:02 CST

Original text of this message

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