SQL0964CThe transaction log for the database is full.
这个错误说明事务日志已满,查到一些解决方法:
方法一:命令行方式
把日志文件的大小和日志文件的数量扩充,如下命令:
db2 update db cfg for DATABASE using LOGFILSIZ 7900
db2 update db cfg for DATABASE using LOGPRIMARY 30
db2 update db cfg for DATABASE using LOGSECOND 20
ibm官方说明:
Too many objects have been loaded into the library server and the transaction to delete rows in the library server transaction tracking table is overfilling the DB2® UDB transaction logs.
Workaround:
1. Stop the migrator process.
2. Stop all the DB2 UDB applications. The DB2 UDB command to stop all the applications is: db2 force applications all
3. Change the number of secondary log files in the DB2 UDB database configuration to a greater number such as 100 (default is 20).
4. To see the database configuration settings, enter the following command in a DB2 UDB command window: db2 get db cfg
5. To update the number of secondary log files to 100, enter the following: db2 command db2 update dbm cfg using LOGSECOND=100
6. Start the migrator process.
The error message should now not be appearing in the library server log, and the transaction to delete rows in the library server transaction tracking table should be successful.
而所谓循环日志方式,是指对主日志文件的循环利用,但是要注意,日志文件的大小必须要满最大单个事务的数据容量需求。因为在一个事务写日志的过程中是不允许循环使用的,平常最好配置到,只使用主日志,不使用第二日志,最好让数据库一天写满一个到两个日志文件。
另外,还有种方法是设置不写日志,即ALTER TABLE A ACTIVATE NOT LOGGED INITIALLY,但是据说这种方法可能会出问题,而且一旦出问题,只能DROP TABLE,无法补救。所以这种方法还是不用了。