Oracle 11gR2 SQLPlus SET EXITCOMMIT ON/OFF

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
EXITONCOMMIT is a new set option with Oracle 11g R2 SQL*Plus. Prior to 11gR2, auto commit is on for all other version. But, in release 2 you can set whether you want autocommit during the SQL*Plus exit.

Example
SQL>  select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 FINANCE        NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 INFRA          ATLANTA
SQL> show exitcommit
exitcommit ON
SQL> set exitcommit off

SQL> show exitcommit
exitcommit OFF

SQL> delete from dept where deptno=50;

1 row deleted.

SQL> exit;

$sqlplus scott/tiger
SQL>  select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 FINANCE        NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
        50 INFRA          ATLANTA

It was not committed during last exit because of exitcommit set as off.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer