- 论坛徽章:
- 0
|
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 |
|