sqlcode -902

txt587 2008-12-21 01:32:09
sql嵌C中在打开数据库时返回sqlcode=-902,不知道是什么原因?
...全文
810 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
janbowu 2009-01-20
  • 打赏
  • 举报
回复
-902 POINTER TO THE ESSENTIAL
CONTROL BLOCK (CT/RDA) HAS
VALUE 0, REBIND REQUIRED
Explanation: Pointer to the essential control block,
either the CT or the RDA is zeroes. This precludes the
successful execution of the current SQL statement, as
well as any subsequent SQL statements.
System Action: The statement cannot be executed.
The application program is not permitted to issue
additional SQL statements. For example, a recovery
routine associated with the application program may not
issue additional SQL statements.
Programmer Response: Rebind the failing application
program and try again. If the problem persists, examine
your DBRM and make sure it matches your program.
SQLSTATE: 58005
王帆 2008-12-23
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 yangxiao_jiang 的回复:]
内部控制块的指针错误,要求重新绑定
[/Quote]
对。

另外,查看错误原因最简单的就是在db2命令行用db2 ? sql902查看一下解释:
C:\Documents and Settings\efan>db2 ? sql902


SQL0902C 发生系统错误 (原因码 =
"<原因码>")。无法处理后续的 SQL 语句。

解释:

发生系统错误。

用户响应:

记录消息中的消息号 (SQLCODE) 和原因码。

如果跟踪是活动的,则在操作系统命令提示符处
调用“独立跟踪设施”。然后与技术服务代表联系
并提供以下信息:

o 问题描述

o SQLCODE 和嵌入式原因码

o SQLCA 内容(如果有可能)

o 跟踪文件(如果有可能)。



联合系统用户:找出使请求失败的数据源中的问
题(参阅 问题确定指南 以确定哪个数据源导致 SQL
语句处理失败)并对该数据源执行必需的诊断步骤
。数据源的问题确定过程各有不同,因此参阅适用
的数据源手册。

sqlcode : -902

sqlstate : 58005
hire9889 2008-12-23
  • 打赏
  • 举报
回复
学到新东东了
huoyin 2008-12-22
  • 打赏
  • 举报
回复
两种方法可以查看db2错误代码信息:

第一种:去IBM DB2 Infocenter(http://publib.boulder.ibm.com/infocenter/db2luw/v8//index.jsp)去搜索

第二种:直接在db2的命令行下输入:db2 ? SQL30081N

摘自我的博客:http://blog.csdn.net/huoyin/archive/2007/12/26/1968506.aspx

A system error (reason code = reason-code) occurred. Subsequent SQL statements cannot be processed.
Explanation:
A system error occurred.

User Response:
Record the message number (SQLCODE) and reason code in the message.

If trace was active, invoke the Independent Trace Facility at the operating system command prompt. Then contact your technical service representative with the following information:

Problem description
SQLCODE and embedded reason code
SQLCA contents if possible
Trace file if possible.
Federated system users: isolate the problem to the data source failing the request (refer to the Troubleshooting Guide to determine which data source is failing to process the SQL statement) and take the necessary diagnostic steps for that data source. The problem determination procedures for data sources vary, so refer to the applicable data source manuals.

sqlcode: -902

sqlstate: 58005
yangxiao_jiang 2008-12-21
  • 打赏
  • 举报
回复
内部控制块的指针错误,要求重新绑定

5,889

社区成员

发帖
与我相关
我的任务
社区描述
IBM DB2 是美国IBM公司开发的一套关系型数据库管理系统,它主要的运行环境为UNIX(包括IBM自家的AIX)、Linux、IBM i(旧称OS/400)、z/OS,以及Windows服务器版本
社区管理员
  • DB2
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧