使用Liquibase Load Data向DB2导入数据时触发SQLCODE=-1218错误
DB2导入特定数据行触发SQLCODE=-1218的问题排查
我使用Liquibase的loadData标签向DB2数据库导入初始数据,其余70个文件均可正常导入,但单个特定文件触发SQLCODE=-1218、SQLSTATE=57011错误。已尝试DB2文档提及的5种修复方案:
- 增大缓冲池大小(已将缓冲池页数提升至100000,问题依旧)
- 减少数据库代理和/或连接数
- 降低最大并行度
- 减小该缓冲池下表空间的预取大小
- 将部分表空间移至其他缓冲池
即使缩小该文件规模,只要包含部分特定数据行(如下示例)就会报错:
"0141.651 ";"004";"default ";"- Valor neto en % " "0144.654 ";"002";"default ";"- Net Value as % " "0311.000-TC ";"002";"default ";"Raw Materials, Supplies "
相关创建语句与脚本
缓冲池与表空间创建语句
CREATE BUFFERPOOL BPDAT SIZE 5000 PAGESIZE 4 K; CREATE TABLESPACE TSBLCORE MANAGED BY DATABASE USING (FILE 'tsblcore.001' 200000) BUFFERPOOL BPDAT;
表结构创建语句
create table BLPDET ( SYMBOLICPOSITIONNO CHAR(15) not null, LANGUAGEKEY CHAR(3) not null, REPORTGROUPKEY CHAR(24) not null, DESCRIPTION CHAR(100) not null ) in TSBLCORE;
Liquibase脚本
<?xml version="1.0" encoding="UTF-8"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.1.xsd" > <changeSet author="Jonas" id="4.31"> <sql>COMMIT;</sql> <loadData encoding="UTF-8" file="build/Server/resources/changelog/Data/BL_POSDESCRIPTION.csv" commentLineStartsWith="" quotchar=""" relativeToChangelogFile="false" schemaName="DB5" separator=";" tableName="BLPDET" usePreparedStatements="false"> </loadData> </changeSet> </databaseChangeLog>
错误日志信息
核心错误日志
2022-08-18-10.58.09.909950+000 I424271E825 LEVEL: Severe PID : 12733 TID : 140309988108032 PROC : db2sysc 0 INSTANCE: db2inst1 NODE : 000 DB : DB2LOCAL APPHDL : 0-503 APPID: 172.17.0.1.55526.220818105144 UOWID : 366 ACTID: 142 AUTHID : DB2INST1 HOSTNAME: d4fac55a3d2e EDUID : 48 EDUNAME: db2agent (DB2LOCAL) 0 FUNCTION: DB2 UDB, buffer pool services, sqlbIsExtentAllocated, probe:4792 MESSAGE : ZRC=0x8502002C=-2063466452=SQLB_BPFULL "no available buffer pool pages" DATA #1 : Pointer, 8 bytes 0x00007f9c366bc3c8 DATA #2 : unsigned integer, 4 bytes 4 DATA #3 : unsigned integer, 4 bytes 0 DATA #4 : Pointer, 8 bytes 0x00007f9c76ffc0d0 DATA #5 : Pointer, 8 bytes 0x00007f9c64d77440
db2diag.log内容
ADM6019E All pages in buffer pool "IBMSYSTEMBP4K" (ID "4096") are in use. Refer to the documentation for SQLCODE -1218 ADM6073W The table space "TSBLCORE" (ID "8") is configured to use buffer pool ID "3", 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.
环境信息
- 数据库产品:DB2/LINUXX8664
- 数据库版本:SQL11055
- 驱动版本:4.8
- Liquibase版本:4.14.0
请问是否可能是这些特定数据行导致了该问题?
内容的提问来源于stack exchange,提问作者Jonas Menne
相关产品推荐
相关产品推荐

