Re: before closing connection does commit query is executed or not

From: Stephen <stephen_p_kennedy_at_hotmail.com>
Date: 21 May 2002 04:40:53 -0700
Message-ID: <85e1466e.0205210340.6428713f_at_posting.google.com>


If you are connected to Oracle in any form, e.g. sqlplus, svrmgrl, whatever, when you disconnect (exit, quit, ^D, whatever) A commit is issued.

This can easily be tested:

sqlplus user/pwd_at_db
insert into table a values (...);
exit
sqlplus user/pwd_at_db
select * from a where <clause to check the values recently inserted>

(I've just checked it on an 8.1.7 on redhat 7.2)

The values are commited.

Stephen

sandeep_bpl_at_yahoo.com (Sandeep Gupta) wrote in message news:<c89fe0be.0205180421.706cce18_at_posting.google.com>...
> Whether you are talking about a PL/SQL Block or a DML statement
> followed by an exit, there is no implicit commit executed.
> If the DBA has set AUTOCOMMIT ON, in that case your statement might
> get committed, but this is not dependable and one must always
> carefully design their application or use commits for SQL's.
>
> You definitely would benefit from Oracle documentation which you can
> download from a Oracle CD.
>
> Cheers
> -Sandeep
>
> andrija.rubelj_at_konzum.hr (andrija) wrote in message news:<4bcceb3d.0205160354.3148da6b_at_posting.google.com>...
> > sachin_at_amsoft.net (Sachin Chadha) wrote in message news:<9140b7ad.0205142353.6012f462_at_posting.google.com>...
> > > before closing a database connection is commit query executed automatically
> > > or we have to explicitly commit.
> >
> > Before closing a database connection, is select sysdate from dual
> > executed automatically? No it isn't. Same is with commit.
Received on Tue May 21 2002 - 13:40:53 CEST

Original text of this message