相关链接

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 : db2syscINSTANCE: db2inst1 NODE : 000 DB : SAMPLEAPPHDL : 0-10 APPID: LOCAL.db2inst1.170421085044AUTHID : DB2INST1 HOSTNAME: testserverEDUID : 582 EDUNAME: db2agent (SAMPLE)FUNCTION: DB2 UDB, catalog services, sqlrlGetVersionTimes, probe:180MESSAGE : 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】 Instance Database DAS 基本管理

    大多数据库的设计与管理方式是相通的.DB2与Oracle的结构与管理维度比较类似,核心在于Instance与database的管理. 这里迅速回忆一下: 一. DB2中OS,Instance,Data ...

  2. 【DB2】DB2安装

    [DB2]DB2安装 F DB2的安装 新 参考: http://blog.csdn.net/TUBER727/article/details/17117109 http://blog.csdn.ne ...

  3. oracle补丁报错10044,【案例】Oracle补丁 数据库打patch报错OPatch failed with error code 73...

    天萃荷净 运维DBA反映在给Oracle数据库安装patch补丁时报错OPatch failed with error code 73,分析原因为相关服务未关闭导致 打patch出现Copy fail ...

  4. an初始java运行环境错误_【环境问题】STS(eclipse)启动出现错误提示:an error hava occured,see the log......

    [环境问题]STS(eclipse)启动出现错误提示:an error hava occured,see the log... 发布时间:2018-06-08 14:08, 浏览次数:562 , 标签 ...

  5. 【DB2】db2命令Export与Import

    环境准备 1.新建表 qinys@Linux:~> db2 "create table tb1(id int,dt timestamp,name varchar(100))" ...

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

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

  7. 【DB2】NULLS LAST与NULLS FIRST

    DB2函数配合  select row_number() over(order by col desc nulls first/nulls last ) as rn,col from table1or ...

  8. 【DB2】DB2错误号汇总

    sqlcode sqlstate DB2错误信息(按sqlcode排序) 000 00000 SQL语句成功完成 01xxx SQL语句成功完成,但是有警告 +012 01545 未限定的列名被解释为 ...

  9. 【DB2】LISTAGG函数中元素的去重(DISTINCT)

    Table of Contents 1. 原始数据 2. DB2 10.5及以前版本的实现 3. DB2 11.1及以后版本的表示方法 LISTAGG 函数用于将多个字符串元素,汇集成一个大的字符串, ...

最新文章

  1. Matplotlib中中文不显示问题
  2. GPUimage实时滤镜的实现
  3. Kali-linux使用Nessus
  4. 读书笔记----10日摘抄整理(11)
  5. C++使函数返回多个数组
  6. 串口通信USART的波特率误差计算GD32、STM32
  7. 手动实现JSON.stringify
  8. offer oracle svp_SVP - Uncyclopedia
  9. Oracle varchar2类型
  10. hog特征的matlab实现
  11. axios 封装数据请求
  12. 特殊符号 mysql_mysql 特殊字符
  13. 中国AI独角兽新增一员:这家公司获得10亿元C轮融资 估值达到12亿美金
  14. Linux路由器的配置
  15. 冰河的高并发电子书开源啦(文末免费领取)!!
  16. NVIDIA Jetson NX配置深度学习环境(Pytorch、torchvision)超级详细,torchvision安装避坑总结
  17. 用C语言恢复误删文件,计算机里被删除的文件可以在哪里进行恢复?
  18. 20190309【原创】下载B站外挂字幕(cc字幕)的方法
  19. 基于开源产品的sftp Cluster 集群方案
  20. sharepoint 2010 moss 培训教程 sharepoint开发经常需要用到的一些基本知识点

热门文章

  1. 数据分析行业之数据挖掘工程师师和数据研发工程师
  2. python简单操作题,Python常用操作运算符及练习题
  3. 智能储物柜/快递柜系统解析一
  4. 魂淡别碰的孩子(接口)
  5. 人生苦短,能让你更早下班的Python垃圾回收机制
  6. cdh平台安装详细教程
  7. 秒懂区块链去中心逻辑
  8. 基于Android的课程成绩管理系统的设计与实现
  9. 计算机组成原理(第三版)唐朔飞-第六章计算机的运算方法-课后习题(1-16)
  10. 零一的昔日织-2022