DB2 Transaction log for the database is full 解决

报错信息:

SQL0964C The transaction log for the database is full

原因分析:

主要问题是数据库的Log file 不够大,可以通过调整LOGFILSIZ、LOGPRIMARY和LOGSECOND的大小解决,但是要注意调整的大小不要超过磁盘空间
计算公式:
磁盘空间的需求=LOGFILSIZ*(LOGPRIMARY+LOGSECOND)*page_size(4k)

具体实施步骤:


1、检查DB2的设置:

su – db2user

db2 list db directory

db2 connect to DB_NAME

db2 get db cfg for DB_NAME|grep -i log

2、修改DB的相关配置

db2 update db cfg for DB_NAME using logfilsiz 81920 logprimary 15 logsecond 10

3、用db2stop 和 db2start 重启DB2

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>