db2为何关闭自动提交不起作用?

db2 list command options ------------------------------------------------------c      自动提交   ON后然用db2 update command options using c OFF再用db2 list command options ------------------------------------------------...显示全部
db2 list command options
-----------------------------------------------------
-c      自动提交   ON


后然用
db2 update command options using c OFF

再用
db2 list command options
-----------------------------------------------------
-c      自动提交   ON

为何没有改变呢?收起
参与8

查看其它 7 个回答ce97的回答

ce97ce97软件开发工程师某某某
DB2 Command Line Processor Option Settings

使用db2 list command options,可得到如下输出:

Backend process wait time (seconds)        (DB2BQTIME) = 1 后端进程等待时间(秒)
No. of retries to connect to backend        (DB2BQTRY) = 60 连接至后端的重试次数
Request queue wait time (seconds)          (DB2RQTIME) = 5 请求队列等待时间(秒)
Input queue wait time (seconds)            (DB2IQTIME) = 5 输入队列等待时间(秒
Command options                           (DB2OPTIONS) =

Option  Description                                                                                                  Current Setting
------  ----------------------------------------                                                                    ---------------
   -a    Display SQLCA(显示 SQLCA)                                                                           OFF
   -c    Auto-Commit(自动落实)                                                                                     ON
   -e    Display SQLCODE/SQLSTATE(显示 SQLCODE/SQLSTATE)                                OFF
   -f    Read from input file(读取输入文件)                                                                     OFF
   -l    Log commands in history file(将命令记录到历史文件中)                                        OFF
   -n    Remove new line character(除去换行字符)                                                        OFF
   -o    Display output(显示输出)                                                                                  ON
   -p    Display interactive input prompt(显示交互式输入提示)                                        ON
   -r    Save output to report file(将输出保存到报告文件)                                                OFF
   -s    Stop execution on command error(在命令出错时停止执行)                                  OFF
   -t    Set statement termination character(设置语句终止字符)                                     OFF
   -v    Echo current command(回送当前命令)                                                                OFF
   -w    Display FETCH/SELECT warning messages(显示 FETCH/SELECT 警告信息)       ON
   -x    Suppress printing of column headings(不打印列标题)                                        OFF
   -z    Save all output to output file(将所有输出保存到输出文件)                                    OFF

以上选项不要求顺序并可以进行组合使用。若要修改其缺省设置,将选项设为打开,只需在选项前加“+”;而将选项关闭则加“-”。
通过设置环境变量 DB2OPTIONS,也可对这些选项进行设置。
在 Window下使用:set DB2OPTIONS='+c -a'
在 UNIX 系统下使用:export DB2OPTIONS='+c -a'。
但命令行处理器选项设置的优先级高于 DB2OPTIONS 的设置。
另外使用 db2 update command options 命令,同样可以实现通过交互式输入模式或命令文件改变选项设置的功能。db2 update command options using c off。
系统集成 · 2009-09-05
浏览2501

回答者

ce97
ce974612
软件开发工程师某某某
擅长领域: 数据库大数据中间件

ce97 最近回答过的问题

回答状态

  • 发布时间:2009-09-05
  • 关注会员:0 人
  • 回答浏览:2501
  • X社区推广