相关链接

https://vinaysdb2blog.blogspot.com/2017/11/how-to-resolve-sql20249n-statement-was-not-processed-error.html

转载

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的更多相关文章

  1. 【DB2】SQL0437W Performance for this complex query may be sub-optimal

    参考链接 Technote (troubleshooting) Problem(Abstract) Error [IBM][CLI Driver][DB2/6000] SQL0437W Perform ...

  2. 【DB2】表空间相关详细说明

    -.创建表空间 1.创建用户表空间 声明:在指定表空间创建路径的时候,需要指定空文件夹,非空文件夹会导致创建报错!!!如果文件夹不存在,那么在创建表空间的时候会自动创建文件夹! 1.1 创建SMS表空 ...

  3. 【DB2】国标行业分类存储,通过SQL查询出层级关系

    新建表 DROP TABLE Industry; CREATE TABLE Industry( IndustryCode VARCHAR(40),IndustryName VARCHAR(100),P ...

  4. 【DB2】SQL1585N 由于没有具有兼容页面大小的可用系统临时表空间,因此无法创建临时表。SQLSTATE=54048

    自己写了一段SQL,SQL中包含ORDER BY 字句,但是在执行的时候报错如下: 经过查询发现是由于临时表空间的PAGESIZE不够大,可考虑建16k或者32k PAGESIZE的表空间 示例如下: ...

  5. 【DB2】Event monitor for locking

    Customer said, they got the following Errors in applications logs Caused by: financing.tools.hub.sha ...

  6. 【DB2】慎用nickname,可能会引起效率较低

    在使用db2的时候,在A库建立了nickname,指向B库的物理表(数据量800多万),现在使用程序(JDBC)连接数据库,并计算指标,但是发现效率很低. 解决办法: 删除A库中的nickname,在 ...

  7. 【DB2】性能管理视图

    1.性能管理部分视图列表 可以使用命令db2 list tables for schema sysibmadm获取所有的性能管理视图 视图名称              模式名            ...

  8. 【DB2】表函数监控数据库

    1.快照表函数 在DB2 V9中能够使用SQL表函数捕获快照,以下是部分表函数列表: 快照表函数                           返回的信息 SNAPSHOT_DBM        ...

  9. 【DB2】delete大表不记录日志的正确操作

    一.原始方法 在删除大表的时候,经常会由于数据量太大,造成日志文件满了,接着无法删除数据. 以下是删除大表不记录日志的具体步骤: 1.临时设置自动提交关闭 (使用命令db2 list command ...

随机推荐

  1. 2018.08.02 洛谷P3355 骑士共存问题(最小割)

    传送门 这题让我联想到一道叫做方格取数问题的题,如果想使摆的更多,就要使不能摆的更少,因此根据骑士的限制条件建图,求出至少有多少骑士不能摆,减一减就行了. 代码: #include<bits/s ...

  2. 一个 图片 滚动 飞入的css特效

    @keyframes bounceInLeft { from, 60%, 75%, 90%, to {animation-timing-function: cubic-bezier(0.215, 0. ...

  3. 山东省第七届ACM竞赛 C题 Proxy (Dijkstra算法,单源路径最短问题)

    题意:给定0-n+1个点,和m条边,让你找到一条从0到n+1的最短路,输出与0相连的结点... 析:很明显么,是Dijkstra算法,不过特殊的是要输出与0相连的边,所以我们倒着搜,也是从n+1找到0 ...

  4. 【redis】linux上的安装与配置(详细图解)

    转载自:https://blog.csdn.net/yjqyyjw/article/details/73293455:经过个人测试也适用于当前最新稳定的3.x的版本,顺便填了几个坑. 1.下载 htt ...

  5. pyhthon 求GPA平均学分绩点

    #coding=utf-8 ''' 北大4.0 成绩 学分 100-90 4.0 89-85 3.7 84-82 3.3 81-78 3.0 77-75 2.7 74-72 2.3 71-68 2.0 ...

  6. 记录:Web相关政策之备案号、视频播放

    (一)备案号链接: 服务器在国内的网站受工信部监管,并受其颁布的<管理办法>约束.根据<互联网信息服务管理办法>及<非经营性互联网信息服务备案管理办法>的法律法规, ...

  7. spring boot docker 初尝试

    Docker服务中进程间通信通过/var/run/docker.sock实现,默认服务不提供监听端口,因此使用docker remote api 需要手动绑定端口. 在centos7.2下,可以进行这 ...

  8. hdu1089 Ignatius's puzzle

    题目 其实这道题不是很难,但是我刚开始拿到这道题的时候不知道怎么做, 因为这个式子我就不知道是干什么的: 65|f(x) 百度解释(若a/b=x...0  称a能被b整除,b能整除a,即b|a,读作& ...

  9. 切勿用普通for循环遍历LinkedList

    ArrayList与LinkedList的普通for循环遍历 对于大部分Java程序员朋友们来说,可能平时使用得最多的List就是ArrayList,对于ArrayList的遍历,一般用如下写法: p ...

  10. 查看Linux服务器被映射的公网ip

    查看Linux服务器被映射的公网ip   现在云服务器非常流行,不仅企业甚至是个人都可能拥有自己的云服务器,但是目前的云服务器厂商提供的公网IP大都是映射而来,所以在Linux服务器上执行ifconf ...