免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2801 | 回复: 1
打印 上一主题 下一主题

db2开发时出现的一个奇怪问题,望大虾解决下 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-06 11:47 |只看该作者 |倒序浏览
我在liunx 用c开发,原程序和数据库分别处于2台机器,在数据库那台机器上建立了2个表,内容一样,一个用于测试,一个用于开发,我的程序连开发的哪个数据库一点问题没有,但是连测试机是,就出现获取游标失败,错误码是-805,请问怎么回事,如何解决。

论坛徽章:
0
2 [报告]
发表于 2008-03-06 12:49 |只看该作者
SQL0805N Package "<package-name>" was not found.  

Explanation:

The statement cannot complete because the necessary package was
not found in the catalog.  

The "<package-name>" is either in the form:

o   'pkgschema.pkgname 0Xcontoken', where the consistency token   
    is given in hexadecimal.  

o   'pkgschema.pkgname.pkgversion', if the package version is the
    empty string then '.pkgversion' is omitted from the name.  

o   '%.pkgname' if the CURRENT PACKAGE PATH is set.  The set of   
    schema names in the CURRENT PACKAGE PATH are implied by the   
    percent character ('%').  



Possible causes for this message (SQLCODE) are:

o   The package was not bound or it was dropped.  

o   If attempting to run a DB2 utility or CLI application, the   
    DB2 utilities may need to be rebound to the database.  

o   '%.pkgname' if the CURRENT PACKAGE PATH is set but no package
    with the name 'pkgname' could be found in any of the schemas  
    in the CURRENT PACKAGE PATH.  



Note that when version-ids are in use for the given
package-schema.package-name, there may be packages defined with
the same package schema and package name, but the correct package
is not found since the existing packages do not match the
requested version or consistency token. A package must match all
three parts of the package-name. When multiple versions are being
used, additional causes for this messages are:

o   the version of the application being executed was precompiled,
     compiled, and linked, but was not bound, or it was bound but
    that version of package was subsequently dropped.  

o   the application was precompiled and bound, but not compiled   
    and/or linked, so the application being executed is not up to
    date.  

o   the package was bound from a bind file generated by a         
    different precompile of the source file than the precompile   
    that produced the modified source file that was compiled and  
    linked into the application executable.  

o   a new application was bound with the same name (and version)  
    of an existing package, thus replacing the existing package.  
    If the application associated with the replaced package is   
    run, this error would result.  

In all these cases, the consistency token of the request does not
match the consistency token of the existing version and thus the
package is considered to be not found.  

The statement cannot be processed.  

User Response:

Specify the correct package name or bind the program.  If the
application being run is not bound to the database, contact the
database administrator to do the necessary binding. Ensure that
the application or object module being executed is the compiled
and linked modified source code associated with the precompile
and bind that generated the package.  

If the CURRENT PACKAGE PATH is set, ensure that the schema that
includes the package is specified in the CURRENT PACKAGE PATH.  

The following SQL statements can be used to query the catalog to
determine if there are different versions of the package.  

  
  SELECT PKGSCHEMA, PKGNAME,
         PKGVERSION, UNIQUE_ID
  FROM SYSCAT.PACKAGES
  WHERE PKGSCHEMA = 'pkgschema'
        and PKGNAME='pkgname'.
  Note that the UNIQUE_ID column corresponds to the consistency
token.  

If the DB2 utility programs need to be rebound to the database,
the database administrator can accomplish this by issuing one of
the following CLP command from the bnd subdirectory of the
instance, while connected to the database:

o   "DB2 bind @db2ubind.lst blocking all grant public" for the   
    DB2 utilities.  

o   "DB2 bind @db2cli.lst blocking all grant public" for CLI.  



Federated system users: ensure that the packages required for
the federated server are bound at the applicable data sources.  
Refer to the Federated Systems Guide for more information about
binding packages to data sources.  

sqlcode :  -805

sqlstate :  51002
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP