I ran a couple of tests against an Oracle 7.3.4 database.

I inserted a row into a table, then immediately typed exit.  The insert was
committed automatically.

I also did an insert and then killed SQL*Plus with a SIGKILL from another
window.  The transaction was NOT committed.

So, by default, SQL*Plus starts up with option AUTOCOMMIT set to OFF, and if
one performs some INSERT/UPDATE/DELETE, an EXIT will in fact commit the
transaction for you.  If the session is abnormally terminated, the
transaction is NOT committed.

Hope this helps.

Phil Culberson
DAT Services

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 16, 2000 11:07 AM
To: Mike Mascari
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [GENERAL] Do transactions rollback by default?


Mike Mascari wrote:

> So, apparently, your friend is assuming that since SQL*Plus is
> performing a COMMIT when the user exits normally, all
> transactions are being committed on disconnect. This is most
> definitely NOT true. You're right to feel your friend's
> statements were completely backwards.

    Would  be  interesting  to  see  what  SQL*Plus  does  if you
    explicitly kill it with SIGKILL (-9). That would tell  if  it
    runs the connection in autocommit mode by default or not.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= [EMAIL PROTECTED] (Jan Wieck) #

Reply via email to