暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

【DB2】内存不足导致数据库还原后前滚失败

1395

Problem

$ db2 rollforward db mmppdb to end of logs and complete

SQL1218N There are no pages currently available in bufferpool "".

SQLSTATE=57011


Analysis

1. First of all production databases usually have much more memory and larger buffer pools. If you have less memory on a testing server, then your database just won't rollforward because it won't be able to activate database which in its turn is due to inability to activate buffer pools. In this situation you also cannot alter buffer pools manually because you cannot connect to the database. Looks like a deadlock.

2. After add a new bufferpool or increase the size of an existing bufferpool, you cannot start and connect to the database. So, how to alter, change, resize, or drop the said bufferpool if you cannot connect to or activate the database (e.g. db2 connect to dbname)?


Resolving The Problem

Configure the performance variable DB2_OVERRIDE_BPF with a smaller number of pages, so that DB2 changes ALL existing bufferpools to a smaller size defined by DB2_OVERRIDE_BPF, at database activation, roll forward recovery, or crash recovery stage.

The changes of DB2 performance variable will not effective until you restart the database manager by running db2stop and then db2start.

To override ALL user-defined bufferpools to 20MB (5000 4KB pages):

db2stop

db2set DB2_OVERRIDE_BPF=5000

db2start

To change the size of bufferpool ID 1 to 6000 4KB pages (useful if you certain that particular bufferpool causes “db2 connect” failure),Doing it you will override all bufferpools if you want to change just an specific bufferpool you should include the bufferpool ID(e.g. db2set DB2_OVERRIDE_BPF=1,5000;3,2000):

db2stop

db2set DB2_OVERRIDE_BPF=1,6000

db2start

Now, try to activate and connect to the database – if successful, then proceed to correct the bufferpools size issue whichever necessary. After correction done, remember to disable or unset the environment variable DB2_OVERRIDE_BPF:

db2stop

db2set DB2_OVERRIDE_BPF=

db2start


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论