C:\Documents and Settings\db2admin>set DB2OPTIONS=+c

这一步基本上是必须的,因为使用 alter table <tablename> activate not logged initially 在该事务中关闭该表的日志选项,在该事务结束后,该表日志开关自动打开。若没有这一步,alter table <tablename> activate not logged initially 这条语句的执行就是一个事务,事务结束,该表日志开关自动打开

C:\Documents and Settings\db2admin>db2 list command options

     Command Line Processor Option Settings

 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) = +c

 Option  Description                               Current Setting
 ------  ----------------------------------------  ---------------
   -a    Display SQLCA                             OFF
   -c    Auto-Commit                               OFF
   -d    Retrieve and display XML declarations     OFF
   -e    Display SQLCODE/SQLSTATE                  OFF
   -f    Read from input file                      OFF
   -i    Display XML data with indentation         OFF
   -l    Log commands in history file              OFF
   -m    Display the number of rows affected       OFF
   -n    Remove new line character                 OFF
   -o    Display output                            ON
   -p    Display interactive input prompt          ON
   -q    Preserve whitespaces & linefeeds          OFF
   -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     ON
   -x    Suppress printing of column headings      OFF
   -z    Save all output to output file            OFF

alter table prom.uwip_part_hist  ACTIVATE  NOT  LOGGED  INITIALLY
delete from prom.uwip_part_hist
值得注意的是最好是在db2 clp 下执行,不要使用图像工具,使用图像工具无效

alter table prom.uwip_part_hist  ACTIVATE  NOT  LOGGED  INITIALLY with empty