执行批处理时,DB2 报数据库的事务日志已满的错误,解决办法.

晚上做批量处理的时候, 在数据库DB2中,,当记录达到100000笔的时候,提示如下错误:

DB2 SQL error: SQLCODE: -964, SQLSTATE: 57011, SQLERRMC: null

C:\>db2
(c) Copyright IBM Corporation 1993,2003
DB2 SDK 8.2.4 的命令行处理器

可从命令提示符处发出数据库管理器命令和 SQL 语句。例如:
    db2 => connect to sample
    db2 => bind sample.bnd

要获得一般帮助,输入:?。
要获得命令帮助,输入:? command,其中 command 可以是
数据库管理器命令的前几个关键字。例如:
 ? CATALOG DATABASE 用于关于 CATALOG DATABASE 命令的帮助
 ? CATALOG          用于关于所有 CATALOG 命令的帮助。

要退出 db2 交互方式,在命令提示符处输入
QUIT。在非交互方式下,所有命令必须以“db2”作前缀。
要列出当前命令选项设置,输入 LIST COMMAND OPTIONS。

要获取更详细的帮助,请参阅 Online Reference Manual。

db2 => connect to testdatabase

   数据库连接信息

 数据库服务器         = DB2/NT 8.2.4
 SQL 授权标识         = ADMINIST...
 本地数据库别名       = TESTDATABASE
 
db2 => get db cfg for testdatabase

       数据库 ccdb 的数据库配置

 数据库配置发行版级别                                    = 0x0a00
 数据库发行版级别                                        = 0x0a00

 数据库地域                                              = CN
 数据库代码页                                            = 1386
 数据库代码集                                            = GBK
 数据库国家/地区代码                                    = 86
 数据库整理顺序                                          = UNIQUE
 备用整理顺序                              (ALT_COLLATE) =
 数据库页大小                                            = 4096

 动态 SQL 查询管理                      (DYN_QUERY_MGMT) = DISABLE

 对此数据库的发现支持                      (DISCOVER_DB) = ENABLE

 缺省查询优化类                           (DFT_QUERYOPT) = 5
 并行度                                     (DFT_DEGREE) = 1
 在算术异常时继续                      (DFT_SQLMATHWARN) = NO
 缺省刷新有效期                        (DFT_REFRESH_AGE) = 0
 缺省维护的选项(DFT_MTTB_TYPES)的表类型                = SYSTEM
 保留的高频值的数目                     (NUM_FREQVALUES) = 10
 保留的分位点数目                        (NUM_QUANTILES) = 20

 备份暂挂                                                = NO

 数据库是一致的                                          = YES
 前滚暂挂                                                = NO
 复原暂挂                                                = NO

 启用的多页文件分配                                      = YES

 恢复状态的日志保留                                      = RECOVERY
 日志记录状态的用户出口                                  = NO

 Data Links 标记到期时间间隔(秒)           (DL_EXPINT) = 60
 Data Links 写标记初始时间间隔           (DL_WT_IEXPINT) = 60
 副本的 Data Links 数目                  (DL_NUM_COPIES) = 1
 删除后的 Data Links 时间(天数)        (DL_TIME_DROP)  = 1
 大写的 Data Links 标记                       (DL_UPPER) = NO
 Data Links 标记算法                          (DL_TOKEN) = MAC0

 数据库堆(4KB)                                (DBHEAP) = 600
 数据库共享内存大小(4KB)             (DATABASE_MEMORY) = AUTOMATIC
 目录高速缓存大小(4KB)               (CATALOGCACHE_SZ) = (MAXAPPLS*4)
 日志缓冲区大小(4KB)                         (LOGBUFSZ) = 8
 实用程序堆大小(4KB)                    (UTIL_HEAP_SZ) = 5000
 缓冲池大小(页)                             (BUFFPAGE) = 250
 扩充存储段大小(4KB)                   (ESTORE_SEG_SZ) = 16000
 扩充存储段的数目                      (NUM_ESTORE_SEGS) = 0
 锁定列表的最大存储量(4KB)                   (LOCKLIST) = 50

 应用程序组内存集的最大大小(4KB)     (APPGROUP_MEM_SZ) = 30000
 应用程序组堆的内存百分比              (GROUPHEAP_RATIO) = 70
 最大应用程序控制堆大小(4KB)         (APP_CTL_HEAP_SZ) = 128

 共享排序的排序堆域值(4KB)            (SHEAPTHRES_SHR) = (SHEAPTHRES)
 排序列表堆(4KB)                            (SORTHEAP) = 256
 SQL 语句堆(4KB)                            (STMTHEAP) = 2048
 缺省应用程序堆(4KB)                      (APPLHEAPSZ) = 256
 程序包高速缓存大小(4KB)                  (PCKCACHESZ) = (MAXAPPLS*8)
 统计信息堆大小(4KB)                    (STAT_HEAP_SZ) = 4384

 检查死锁的时间间隔(毫秒)                  (DLCHKTIME) = 10000
 每个应用程序的锁定百分比列表                 (MAXLOCKS) = 22
 锁定超时(秒)                             (LOCKTIMEOUT) = -1

 更改的页阈值                           (CHNGPGS_THRESH) = 60
 异步页清除程序的数目                   (NUM_IOCLEANERS) = 1
 I/O 服务器的数目                        (NUM_IOSERVERS) = 3
 索引排序标志                                 (INDEXSORT) = YES
 顺序检测标志                                (SEQDETECT) = YES
 缺省预取大小(页)                    (DFT_PREFETCH_SZ) = AUTOMATIC

 跟踪修改的页数                               (TRACKMOD) = ON

 容器的缺省数目                                          = 1
 缺省表空间扩展数据块大小(页)            (DFT_EXTENT_SZ) = 32

 活动应用程序的最大数目                       (MAXAPPLS) = AUTOMATIC
 活动应用程序的平均数目       (AVG_APPLS) = 1
 每个应用程序的最大打开数据库文件数           (MAXFILOP) = 64

 日志文件大小(4KB)                         (LOGFILSIZ) = 1000
 主日志文件的数目                           (LOGPRIMARY) = 3
 辅助日志文件的数目                          (LOGSECOND) = 2
 已更改的至日志文件的路径                   (NEWLOGPATH) =
 日志文件路径                                            = D:\DB2\NODE0000\SQL00
003\SQLOGDIR\
 溢出日志路径                          (OVERFLOWLOGPATH) =
 镜像日志路径                            (MIRRORLOGPATH) =
 首个活动日志文件                                        = S0000005.LOG
 磁盘上已满的块日志                    (BLK_LOG_DSK_FUL) = NO
 事务使用的最大活动日志空间的百分比            (MAX_LOG) = 0
 1 个活动 UOW 的活动日志文件的数目        (NUM_LOG_SPAN) = 0

 组落实计数                                  (MINCOMMIT) = 1
 软检查点前回收的日志文件的百分比              (SOFTMAX) = 100
 启用的恢复的日志保留                        (LOGRETAIN) = RECOVERY
 启用的日志记录的用户出口                     (USEREXIT) = OFF

 HADR 数据库角色                                          = STANDARD
 HADR 本地主机名                        (HADR_LOCAL_HOST) =
 HADR 本地服务名称                       (HADR_LOCAL_SVC) =
 HADR 远程主机名                       (HADR_REMOTE_HOST) =
 HADR 远程服务名称                      (HADR_REMOTE_SVC) =
 远程服务器的 HADR 实例名              (HADR_REMOTE_INST) =
 HADR 超时值                               (HADR_TIMEOUT) = 120
 HADR 日志写同步方式                      (HADR_SYNCMODE) = NEARSYNC

 第一个日志归档方法                        (LOGARCHMETH1) = LOGRETAIN
 logarchmeth1 的选项                        (LOGARCHOPT1) =
 第二个日志归档方法                        (LOGARCHMETH2) = OFF
 logarchmeth2 的选项                        (LOGARCHOPT2) =
 故障转移日志归档路径                     (FAILARCHPATH) =
 错误时重试日志归档次数                   (NUMARCHRETRY) = 5
 日志归档重试延迟(秒)                 (ARCHRETRYDELAY) = 20
 供应商选项                                  (VENDOROPT) =

 启用的自动重新启动                        (AUTORESTART) = ON
 索引重新创建时间和重做索引构建               (INDEXREC) = SYSTEM (RESTART)
 在索引构建期间记录页                    (LOGINDEXBUILD) = OFF
 loadrec 会话的缺省数目                (DFT_LOADREC_SES) = 1
 要保留的数据库备份的数目               (NUM_DB_BACKUPS) = 12
 恢复历史保留时间(天数)              (REC_HIS_RETENTN) = 366

 TSM 管理类                              (TSM_MGMTCLASS) =
 TSM 节点名                               (TSM_NODENAME) =
 TSM 所有者                                  (TSM_OWNER) =
 TSM 密码                                 (TSM_PASSWORD) =

 自动维护                                   (AUTO_MAINT) = OFF
 自动数据库备份                       (AUTO_DB_BACKUP) = OFF
 自动表维护                           (AUTO_TBL_MAINT) = OFF
 自动 runstats                       (AUTO_RUNSTATS) = OFF
 自动统计信息概要分析              (AUTO_STATS_PROF) = OFF
 自动概要文件更新                  (AUTO_PROF_UPD) = OFF
  自动重组                               (AUTO_REORG) = OFF

db2 => update db cfg for testdatabase using logfilsiz 6000; (这个地方由于加了分号,所以报错了)
SQL0104N  在 "LOGFILSIZ" 之后发现意外的标记
"6000;"。期望的标记可能包括:"<不带符号的长数字>"。  SQLSTATE=42601


db2 => update db cfg for testdatabase using logfilsiz 6000
DB20000I  UPDATE DATABASE CONFIGURATION 命令成功完成。
SQL1363W  为立即修改而提交的一个或多个参数未动态更改。对于这些配置参数,必须在所

有应用程序都与此数据库断开连接之后,更改才会生效。
db2 => get db cfg for testdatabase

       数据库 testdatabase 的数据库配置

 数据库配置发行版级别                                    = 0x0a00
 数据库发行版级别                                        = 0x0a00

 数据库地域                                              = CN
 数据库代码页                                            = 1386
 数据库代码集                                            = GBK
 数据库国家/地区代码                                    = 86
 数据库整理顺序                                          = UNIQUE
 备用整理顺序                              (ALT_COLLATE) =
 数据库页大小                                            = 4096

 动态 SQL 查询管理                      (DYN_QUERY_MGMT) = DISABLE

 对此数据库的发现支持                      (DISCOVER_DB) = ENABLE

 缺省查询优化类                           (DFT_QUERYOPT) = 5
 并行度                                     (DFT_DEGREE) = 1
 在算术异常时继续                      (DFT_SQLMATHWARN) = NO
 缺省刷新有效期                        (DFT_REFRESH_AGE) = 0
 缺省维护的选项(DFT_MTTB_TYPES)的表类型                = SYSTEM
 保留的高频值的数目                     (NUM_FREQVALUES) = 10
 保留的分位点数目                        (NUM_QUANTILES) = 20

 备份暂挂                                                = NO

 数据库是一致的                                          = YES
 前滚暂挂                                                = NO
 复原暂挂                                                = NO

 启用的多页文件分配                                      = YES

 恢复状态的日志保留                                      = RECOVERY
 日志记录状态的用户出口                                  = NO

 Data Links 标记到期时间间隔(秒)           (DL_EXPINT) = 60
 Data Links 写标记初始时间间隔           (DL_WT_IEXPINT) = 60
 副本的 Data Links 数目                  (DL_NUM_COPIES) = 1
 删除后的 Data Links 时间(天数)        (DL_TIME_DROP)  = 1
 大写的 Data Links 标记                       (DL_UPPER) = NO
 Data Links 标记算法                          (DL_TOKEN) = MAC0

 数据库堆(4KB)                                (DBHEAP) = 600
 数据库共享内存大小(4KB)             (DATABASE_MEMORY) = AUTOMATIC
 目录高速缓存大小(4KB)               (CATALOGCACHE_SZ) = (MAXAPPLS*4)
 日志缓冲区大小(4KB)                         (LOGBUFSZ) = 8
 实用程序堆大小(4KB)                    (UTIL_HEAP_SZ) = 5000
 缓冲池大小(页)                             (BUFFPAGE) = 250
 扩充存储段大小(4KB)                   (ESTORE_SEG_SZ) = 16000
 扩充存储段的数目                      (NUM_ESTORE_SEGS) = 0
 锁定列表的最大存储量(4KB)                   (LOCKLIST) = 50

 应用程序组内存集的最大大小(4KB)     (APPGROUP_MEM_SZ) = 30000
 应用程序组堆的内存百分比              (GROUPHEAP_RATIO) = 70
 最大应用程序控制堆大小(4KB)         (APP_CTL_HEAP_SZ) = 128

 共享排序的排序堆域值(4KB)            (SHEAPTHRES_SHR) = (SHEAPTHRES)
 排序列表堆(4KB)                            (SORTHEAP) = 256
 SQL 语句堆(4KB)                            (STMTHEAP) = 2048
 缺省应用程序堆(4KB)                      (APPLHEAPSZ) = 256
 程序包高速缓存大小(4KB)                  (PCKCACHESZ) = (MAXAPPLS*8)
 统计信息堆大小(4KB)                    (STAT_HEAP_SZ) = 4384

 检查死锁的时间间隔(毫秒)                  (DLCHKTIME) = 10000
 每个应用程序的锁定百分比列表                 (MAXLOCKS) = 22
 锁定超时(秒)                             (LOCKTIMEOUT) = -1

 更改的页阈值                           (CHNGPGS_THRESH) = 60
 异步页清除程序的数目                   (NUM_IOCLEANERS) = 1
 I/O 服务器的数目                        (NUM_IOSERVERS) = 3
 索引排序标志                                 (INDEXSORT) = YES
 顺序检测标志                                (SEQDETECT) = YES
 缺省预取大小(页)                    (DFT_PREFETCH_SZ) = AUTOMATIC

 跟踪修改的页数                               (TRACKMOD) = ON

 容器的缺省数目                                          = 1
 缺省表空间扩展数据块大小(页)            (DFT_EXTENT_SZ) = 32

 活动应用程序的最大数目                       (MAXAPPLS) = AUTOMATIC
 活动应用程序的平均数目       (AVG_APPLS) = 1
 每个应用程序的最大打开数据库文件数           (MAXFILOP) = 64

 日志文件大小(4KB)                         (LOGFILSIZ) = 6000
 主日志文件的数目                           (LOGPRIMARY) = 3
 辅助日志文件的数目                          (LOGSECOND) = 2
 已更改的至日志文件的路径                   (NEWLOGPATH) =
 日志文件路径                                            = D:\DB2\NODE0000\SQL00
003\SQLOGDIR\
 溢出日志路径                          (OVERFLOWLOGPATH) =
 镜像日志路径                            (MIRRORLOGPATH) =
 首个活动日志文件                                        = S0000005.LOG
 磁盘上已满的块日志                    (BLK_LOG_DSK_FUL) = NO
 事务使用的最大活动日志空间的百分比            (MAX_LOG) = 0
 1 个活动 UOW 的活动日志文件的数目        (NUM_LOG_SPAN) = 0

 组落实计数                                  (MINCOMMIT) = 1
 软检查点前回收的日志文件的百分比              (SOFTMAX) = 100
 启用的恢复的日志保留                        (LOGRETAIN) = RECOVERY
 启用的日志记录的用户出口                     (USEREXIT) = OFF

 HADR 数据库角色                                          = STANDARD
 HADR 本地主机名                        (HADR_LOCAL_HOST) =
 HADR 本地服务名称                       (HADR_LOCAL_SVC) =
 HADR 远程主机名                       (HADR_REMOTE_HOST) =
 HADR 远程服务名称                      (HADR_REMOTE_SVC) =
 远程服务器的 HADR 实例名              (HADR_REMOTE_INST) =
 HADR 超时值                               (HADR_TIMEOUT) = 120
 HADR 日志写同步方式                      (HADR_SYNCMODE) = NEARSYNC

 第一个日志归档方法                        (LOGARCHMETH1) = LOGRETAIN
 logarchmeth1 的选项                        (LOGARCHOPT1) =
 第二个日志归档方法                        (LOGARCHMETH2) = OFF
 logarchmeth2 的选项                        (LOGARCHOPT2) =
 故障转移日志归档路径                     (FAILARCHPATH) =
 错误时重试日志归档次数                   (NUMARCHRETRY) = 5
 日志归档重试延迟(秒)                 (ARCHRETRYDELAY) = 20
 供应商选项                                  (VENDOROPT) =

 启用的自动重新启动                        (AUTORESTART) = ON
 索引重新创建时间和重做索引构建               (INDEXREC) = SYSTEM (RESTART)
 在索引构建期间记录页                    (LOGINDEXBUILD) = OFF
 loadrec 会话的缺省数目                (DFT_LOADREC_SES) = 1
 要保留的数据库备份的数目               (NUM_DB_BACKUPS) = 12
 恢复历史保留时间(天数)              (REC_HIS_RETENTN) = 366

 TSM 管理类                              (TSM_MGMTCLASS) =
 TSM 节点名                               (TSM_NODENAME) =
 TSM 所有者                                  (TSM_OWNER) =
 TSM 密码                                 (TSM_PASSWORD) =

 自动维护                                   (AUTO_MAINT) = OFF
   自动数据库备份                       (AUTO_DB_BACKUP) = OFF
   自动表维护                           (AUTO_TBL_MAINT) = OFF
     自动 runstats                       (AUTO_RUNSTATS) = OFF
     自动统计信息概要分析              (AUTO_STATS_PROF) = OFF
       自动概要文件更新                  (AUTO_PROF_UPD) = OFF
     自动重组                               (AUTO_REORG) = OFF


db2 => update db cfg for testdatabase using logprimary 4;  (又是由于加了分号,报错了)
SQL0104N  在 "LOGPRIMARY" 之后发现意外的标记
"4;"。期望的标记可能包括:"<不带符号的短数字>"。  SQLSTATE=42601

db2 => update db cfg for testdatabase using logprimary 4
DB20000I  UPDATE DATABASE CONFIGURATION 命令成功完成。
SQL1363W  为立即修改而提交的一个或多个参数未动态更改。对于这些配置参数,必须在所

有应用程序都与此数据库断开连接之后,更改才会生效。
db2 => update db cfg for testdatabase using logsecond 25;
SQL0104N  在 "LOGSECOND" 之后发现意外的标记
"25;"。期望的标记可能包括:"<短数字>"。  SQLSTATE=42601
db2 => update db cfg for testdatabase using logsecond 25
DB20000I  UPDATE DATABASE CONFIGURATION 命令成功完成。

db2 => get db cfg for testdatabase

       数据库 testdatabase 的数据库配置

 数据库配置发行版级别                                    = 0x0a00
 数据库发行版级别                                        = 0x0a00

 数据库地域                                              = CN
 数据库代码页                                            = 1386
 数据库代码集                                            = GBK
 数据库国家/地区代码                                    = 86
 数据库整理顺序                                          = UNIQUE
 备用整理顺序                              (ALT_COLLATE) =
 数据库页大小                                            = 4096

 动态 SQL 查询管理                      (DYN_QUERY_MGMT) = DISABLE

 对此数据库的发现支持                      (DISCOVER_DB) = ENABLE

 缺省查询优化类                           (DFT_QUERYOPT) = 5
 并行度                                     (DFT_DEGREE) = 1
 在算术异常时继续                      (DFT_SQLMATHWARN) = NO
 缺省刷新有效期                        (DFT_REFRESH_AGE) = 0
 缺省维护的选项(DFT_MTTB_TYPES)的表类型                = SYSTEM
 保留的高频值的数目                     (NUM_FREQVALUES) = 10
 保留的分位点数目                        (NUM_QUANTILES) = 20

 备份暂挂                                                = NO

 数据库是一致的                                          = YES
 前滚暂挂                                                = NO
 复原暂挂                                                = NO

 启用的多页文件分配                                      = YES

 恢复状态的日志保留                                      = RECOVERY
 日志记录状态的用户出口                                  = NO

 Data Links 标记到期时间间隔(秒)           (DL_EXPINT) = 60
 Data Links 写标记初始时间间隔           (DL_WT_IEXPINT) = 60
 副本的 Data Links 数目                  (DL_NUM_COPIES) = 1
 删除后的 Data Links 时间(天数)        (DL_TIME_DROP)  = 1
 大写的 Data Links 标记                       (DL_UPPER) = NO
 Data Links 标记算法                          (DL_TOKEN) = MAC0

 数据库堆(4KB)                                (DBHEAP) = 600
 数据库共享内存大小(4KB)             (DATABASE_MEMORY) = AUTOMATIC
 目录高速缓存大小(4KB)               (CATALOGCACHE_SZ) = (MAXAPPLS*4)
 日志缓冲区大小(4KB)                         (LOGBUFSZ) = 8
 实用程序堆大小(4KB)                    (UTIL_HEAP_SZ) = 5000
 缓冲池大小(页)                             (BUFFPAGE) = 250
 扩充存储段大小(4KB)                   (ESTORE_SEG_SZ) = 16000
 扩充存储段的数目                      (NUM_ESTORE_SEGS) = 0
 锁定列表的最大存储量(4KB)                   (LOCKLIST) = 50

 应用程序组内存集的最大大小(4KB)     (APPGROUP_MEM_SZ) = 30000
 应用程序组堆的内存百分比              (GROUPHEAP_RATIO) = 70
 最大应用程序控制堆大小(4KB)         (APP_CTL_HEAP_SZ) = 128

 共享排序的排序堆域值(4KB)            (SHEAPTHRES_SHR) = (SHEAPTHRES)
 排序列表堆(4KB)                            (SORTHEAP) = 256
 SQL 语句堆(4KB)                            (STMTHEAP) = 2048
 缺省应用程序堆(4KB)                      (APPLHEAPSZ) = 256
 程序包高速缓存大小(4KB)                  (PCKCACHESZ) = (MAXAPPLS*8)
 统计信息堆大小(4KB)                    (STAT_HEAP_SZ) = 4384

 检查死锁的时间间隔(毫秒)                  (DLCHKTIME) = 10000
 每个应用程序的锁定百分比列表                 (MAXLOCKS) = 22
 锁定超时(秒)                             (LOCKTIMEOUT) = -1

 更改的页阈值                           (CHNGPGS_THRESH) = 60
 异步页清除程序的数目                   (NUM_IOCLEANERS) = 1
 I/O 服务器的数目                        (NUM_IOSERVERS) = 3
 索引排序标志                                 (INDEXSORT) = YES
 顺序检测标志                                (SEQDETECT) = YES
 缺省预取大小(页)                    (DFT_PREFETCH_SZ) = AUTOMATIC

 跟踪修改的页数                               (TRACKMOD) = ON

 容器的缺省数目                                          = 1
 缺省表空间扩展数据块大小(页)            (DFT_EXTENT_SZ) = 32

 活动应用程序的最大数目                       (MAXAPPLS) = AUTOMATIC
 活动应用程序的平均数目       (AVG_APPLS) = 1
 每个应用程序的最大打开数据库文件数           (MAXFILOP) = 64

 日志文件大小(4KB)                         (LOGFILSIZ) = 6000
 主日志文件的数目                           (LOGPRIMARY) = 4
 


 辅助日志文件的数目                 &a

你可能感兴趣的:(sql,应用服务器,db2,活动,配置管理)