【DB2】How to resolve SQL20249N the statement was not processed with error
相关链接
转载
https://www-01.ibm.com/support/docview.wss?uid=swg22002381
Technote (troubleshooting)
Problem(Abstract)
In this scenario you perform a restore of a database from a backup image. When the restore completes you receive the error SQL20249N running commands on the database.
Symptom
You are restoring from a database backup image with a higher Fix Pack number than the instance it is being restored to, as shown by the example db2diag.log below.
2017-04-21-12.50.46.077587-240 I235453E572 LEVEL: Severe
PID : 15273 TID : 46914280089920 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000 DB : SAMPLE
APPHDL : 0-10 APPID: LOCAL.db2inst1.170421085044
AUTHID : DB2INST1 HOSTNAME: testserver
EDUID : 582 EDUNAME: db2agent (SAMPLE)
FUNCTION: DB2 UDB, catalog services, sqlrlGetVersionTimes, probe:180
MESSAGE : Database release: 10050700 ==> Database is now moved back to the
current DB2 release level of 10050600*
When running the query below...
db2 "select varchar(pkgschema,16),varchar(pkgname,16),valid from syscat.packages where pkgschema='NULLID' and pkgname='SQLUAK20'"
You receive the error below...
SQL20249N The statement was not processed because the package named "NULLID.SQLC2K26" needs to be explicitly rebound.
Cause
Downgrade of database to a lower Fix Pack through a restore causes packages to become invalid. Packages in a later Fix Pack may have certain differences from those in a previous Fix Pack, so if a database is downgraded, the packages are initially set as invalid, forcing the need for those invalid packages to go through the "rebind" action.
Diagnosing the problem
Check the db2diag.log after the restore to see there is an entry like the one above shown in the Symptom.
After a restore you would see error SQL20249N when trying to run commands on the database.
(See example in Symptom).
Resolving the problem
Explicitly rebind packages by performing the below commands.
db2 connect to SAMPLE
db2 rebind <package name> RESOLVE CONSERVATIVE
or
db2 -x "select 'REBIND PACKAGE ' || rtrim(pkgschema) || '.' || rtrim(pkgname) || ';' as command from syscat.packages" > rebind.sql
db2 -tvf rebind.sql
And then try the command.
db2 " select pkgschema,pkgname,valid from syscat.packages where pkgschema='NULLID' and pkgname='SQLUAK20' "
The query should work without error SQL20249N.
【DB2】How to resolve SQL20249N the statement was not processed with error的更多相关文章
- 【DB2】SQL0437W Performance for this complex query may be sub-optimal
参考链接 Technote (troubleshooting) Problem(Abstract) Error [IBM][CLI Driver][DB2/6000] SQL0437W Perform ...
- 【DB2】表空间相关详细说明
-.创建表空间 1.创建用户表空间 声明:在指定表空间创建路径的时候,需要指定空文件夹,非空文件夹会导致创建报错!!!如果文件夹不存在,那么在创建表空间的时候会自动创建文件夹! 1.1 创建SMS表空 ...
- 【DB2】国标行业分类存储,通过SQL查询出层级关系
新建表 DROP TABLE Industry; CREATE TABLE Industry( IndustryCode VARCHAR(40),IndustryName VARCHAR(100),P ...
- 【DB2】SQL1585N 由于没有具有兼容页面大小的可用系统临时表空间,因此无法创建临时表。SQLSTATE=54048
自己写了一段SQL,SQL中包含ORDER BY 字句,但是在执行的时候报错如下: 经过查询发现是由于临时表空间的PAGESIZE不够大,可考虑建16k或者32k PAGESIZE的表空间 示例如下: ...
- 【DB2】Event monitor for locking
Customer said, they got the following Errors in applications logs Caused by: financing.tools.hub.sha ...
- 【DB2】慎用nickname,可能会引起效率较低
在使用db2的时候,在A库建立了nickname,指向B库的物理表(数据量800多万),现在使用程序(JDBC)连接数据库,并计算指标,但是发现效率很低. 解决办法: 删除A库中的nickname,在 ...
- 【DB2】性能管理视图
1.性能管理部分视图列表 可以使用命令db2 list tables for schema sysibmadm获取所有的性能管理视图 视图名称 模式名 ...
- 【DB2】表函数监控数据库
1.快照表函数 在DB2 V9中能够使用SQL表函数捕获快照,以下是部分表函数列表: 快照表函数 返回的信息 SNAPSHOT_DBM ...
- 【DB2】delete大表不记录日志的正确操作
一.原始方法 在删除大表的时候,经常会由于数据量太大,造成日志文件满了,接着无法删除数据. 以下是删除大表不记录日志的具体步骤: 1.临时设置自动提交关闭 (使用命令db2 list command ...
随机推荐
- 实现WIFI MAC认证与漫游
前言 单位里有10来个网件的AP(WNAP210),需要对接入端(主要是手机)进行MAC认证,原来采用AP本地MAC认证,但是人员经常变动(离职),另外人员的岗位(流水线)也经常调整,这样就需在变动后 ...
- 如何在Linux中统计一个进程的线程数(转)
方法一: /proc proc 伪文件系统,它驻留在 /proc 目录,这是最简单的方法来查看任何活动进程的线程数. /proc 目录以可读文本文件形式输出,提供现有进程和系统硬件相关的信息如 CPU ...
- UVaLive 2796 Concert Hall Scheduling (最小费用流)
题意:个著名的音乐厅因为财务状况恶化快要破产,你临危受命,试图通过管理的手段来拯救它,方法之一就是优化演出安排,既聪明的决定接受或拒绝哪些乐团的演出申请,使得音乐厅的收益最大化.该音乐厅有两个完全相同 ...
- C#中验证sql语句是否正确(不执行语句)
SET PARSEONLY检查每个 Transact-SQL 语句的语法并返回任何错误消息,但不编译和执行语句.SET PARSEONLY { ON | OFF }当 SET PARSEONLY 为 ...
- MemCache 安全使用原则(自己整理,仅供参考)
// 触发器:作用是检查缓存时否可用(不用add做触发器),避免缓存不可用时add返回false按非首次登陆处理,导致不能增加成长值. memCachedClient.get(memCacheKey) ...
- (匹配)Antenna Placement --POJ --3020
链接: http://poj.org/problem?id=3020 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=82834#probl ...
- leanCloud 笔记
目的:javascript实时通讯.感觉:nodejs的socket.io加了一个图形界面和接口,它保证了所有环境下的实时通信. 最新版leancloud支持的服务:实时消息推送,实时点对点消息服务. ...
- java.util.Date与java.sql.Date的关系和转换方法(转)
在ResultSet中我们经常使用的setDate或getDate的数据类型是java.sql.Date,而在平时java程序中我们一般习惯使用 java.util.Date. 因此在DAO层我们经常 ...
- Android 一个应用多个桌面图标
理解android.intent.action.MAIN 与 android.intent.category.LAUNCHER: 在Android 应用程序开发过程中,Activity入口会增加: a ...
- tf中softmax_cross_entropy_with_logits与sparse_softmax_cross_entropy_with_logits
其实这两个都是计算交叉熵,只是输入数据不同. #sparse 稀疏的.稀少的 word_labels = tf.constant([2,0]) predict_logits = tf.constant ...