Oracle 11gR2中SQL*Plus中的新设置exitcommit
2017-04-05 16:57
435 查看
--Oracle 11gR2中SQL*Plus中的新设置exitcommit The default setting is ON, which means that work is committed on exit, whether you expected it to be committed or not. Set EXITCOMMIT OFF to rollback work on exit. --默认情况下exitcommit为ON状态 SCOTT@PROD1> show exitcommit exitcommit ON --创建表进行对比实验 SCOTT@PROD1> create table t (id number); Table created. --插入数据后直接exit退出,发现退出时完成了自动commit SCOTT@PROD1> insert into t values (1); 1 row created. SCOTT@PROD1> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@ocm1 ~]$ sqlplus scott/tiger SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 5 16:48:58 2017 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SCOTT@PROD1> select * from t; ID ---------- 1 --清空数据,并把exitcommit参数置为OFF SCOTT@PROD1> truncate table t; Table truncated. SCOTT@PROD1> set exitcommit off SCOTT@PROD1> show exitcommit exitcommit OFF --插入数据后直接exit退出,发现退出时完成了自动rollback SCOTT@PROD1> insert into t values (1); 1 row created. SCOTT@PROD1> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@ocm1 ~]$ sqlplus scott/tiger SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 5 16:49:32 2017 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SCOTT@PROD1> select * from t; no rows selected
相关文章推荐
- 安装完成oracle 11g R2 后,使用sqlplus 报错"sqlplus: error while loading shared libraries" ...
- Oracle sqlplus 客户端设置 故障解决办法
- 设置 oracle sqlplus DBMS_OUTPUT.put_line
- 跟我一起学Oracle 11g【3】----SQL*Plus运用与OEM简介
- sqlplus 连接本地oracle tnsnames.ora中设置语句
- oracle sqlplus设置显示
- 姚博文 Oracle Sql/Plus环境设置
- solaris 10 安装 oracle 11g R2内核参数设置
- Oracle Sqlplus设置行数和宽度
- Oracle Sqlplus设置行数和宽度
- oracle:完整剖析PL/SQL DEVELOPER与SQL PLUS字符集设置
- oracle sql/plus 常用设置命令
- Oracle sqlplus设置显示格式命令详解
- Oracle 11g系列—3—SQL*Plus运用与OEM简介
- Oracle SQLPlus 一些使用经验记录(设置环境变量和字符串比较)
- Oracle Sqlplus设置行数和宽度
- (转-实用)Oracle SQL*PLUS命令应用 设置显示列格式的相关命令
- oracle:完整剖析PL/SQL DEVELOPER与SQL PLUS字符集设置
- Debian 6 设置Oracle 11g R2开机自动启动
- oracle 11g-sqlplus登录密码问题