DB2 SQLCode -1218错误

一生产系统,最近数据库操作频繁出现-1218错误:

<!-- lang: java -->
java.sql.SQLException: [BEA][DB2 JDBC Driver][DB2]Error occured with SQLCode -1218 with the following parameters: 4096
    at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
    at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
    at weblogic.jdbc.db2.drda.DRDARequest.processSQLCA(Unknown Source)
    at weblogic.jdbc.db2.drda.DRDARequest.processCodePoint(Unknown Source)
    at weblogic.jdbc.db2.drda.DRDAStatementRequest.processCodePoint(Unknown Source)
    at weblogic.jdbc.db2.drda.DRDAExecuteStatementRequest.processCodePoint(Unknown Source)
    at weblogic.jdbc.db2.drda.DRDARequest.processReply(Unknown Source)
    at weblogic.jdbc.db2.DB2ImplStatement.getNextResultType(Unknown Source)
    at weblogic.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
    at weblogic.jdbc.base.BaseStatement.postImplExecute(Unknown Source)

根据DB2错误码分析,第一感觉以为是数据库库缓冲池太小,不能满足业务需要,需要扩大缓冲池大小来解决这个问题。仔细考虑后觉得有些不对劲,查询了许多资料,都是说怎么扩充缓冲池的,后来查询了数据库最近一段时间的日志,在数据库日志中找到了真正的原因是因为平台上的可用物理内存不中,导致我们新建的缓冲池没有激活,数据库系统自动将缓冲池切换到一个隐藏的容量很小的缓冲池上导致的。DB2的这个坑爹的设计!数据库日志信息大体如下:

<!-- lang: java -->
    MESSAGE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG
      "No Storage Available for allocation"
      DIA8305C Memory allocation failure occurred.
        DATA #1 : String, 286 bytes
        Failed to allocate the desired database shared memory set.
        Check to make sure the configured DATABASE_MEMORY + overflow
    does not exceed the maximum shared memory on the system.
    Attempting to start up with only the system buffer pools.
    Desired database shared memory set size is (bytes):
    DATA #2 : unsigned integer, 4 bytes
    1651048448
    MESSAGE : ADM6073W  The table space "SYSCATSPACE" (ID "0") is configured to use 
      buffer pool ID "1", but this buffer pool is not active at this time. 
      In the interim the table space will use buffer pool ID "4096".  The 
      inactive buffer pool should become available at next database startup 
      provided that the required memory is available.

转载于:https://my.oschina.net/bugfiller/blog/148244

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值