事务默认为自动提交(def_auto_commit)
📄字数 339
👁️阅读量 加载中...
引入版本
v11.0.0
功能描述
事务是否默认自动提交。
参数属性
| 属性 | 属性值 |
|---|---|
| 参数类型 | BOOLEAN |
| 默认值 | TRUE |
| 取值范围 | TRUE,FALSE |
| 影响范围 | 系统级 |
| 修改方式 | 离线修改,重启生效。 |
使用场景说明
- def_auto_commit = true, 执行 SQL命令后自动提交事务。
- 若新建连接未显式指定会话参数 auto_commit,则使用该参数值作为默认值。
注意
- 会话参数 auto_commit 的优先级高于系统参数 def_auto_commit。
示例
sql
-- 离线修改 def_auto_commit
编辑 xugu.ini 修改 def_auto_commit,重启数据库服务后生效。
-- 在线查看 def_auto_commit
SQL> SHOW def_auto_commit;