SQLCODE -805 means Db2 cannot locate or execute the required package for a statement.
DB2 SQLCODE -805 indicates that the required package (DBRM) was not found or is invalid. Rebind the application package or add the correct collection to CURRENT PACKAGE PATH to resolve the error.
DBRM OR PACKAGE NAME location.collection.program.consistency-token NOT FOUND IN PLAN plan-name. REASON 805
SQLCODE -805 fires when Db2 cannot find or use the package containing the executable form of an SQL statement. The message identifies the missing location, collection, program, and consistency token, pinpointing the exact package Db2 expected.
Because the package is missing, invalid, or not in the active search path, Db2 halts the statement with -805 to prevent ambiguous execution.
Fixing the path or rebinding the package removes the error immediately.
The error appears at run time, not bind time.
It commonly surfaces in stored procedures, dynamic SQL issued from applications, and during remote calls over Db2 Connect where package collections differ between client and server.
It also occurs after program migrations when the load module contains a consistency token that no longer matches the bound package in the catalog.
Failing SQL statements can cascade, breaking transactions, batch jobs, or web requests.
For OLTP systems, repeated -805 errors flood logs and consume CPU as Db2 repeatedly searches for missing packages. Prompt resolution restores performance and stability.
.
The package named in the error has never been bound, or someone accidentally ran FREE PACKAGE, leaving no executable copy.
The package exists but in a different collection than the CURRENT PACKAGE PATH used for the connection, so Db2’s search order fails to locate it.
The program was relinked or recompiled, altering the timestamp token.
The existing package points to the old token, so Db2 treats it as a different object.
For DRDA connections, the NULLID packages (e.g., NULLID.SYSLH000) may be missing or at the wrong APPLCOMPAT level, causing -805 for dynamic SQL.
.
It is a run-time error that appears when the application issues a statement and Db2 cannot find a usable package.
No. The consistency token ensures the program and package match exactly. Rebinding without matching tokens can cause -818 or logical errors.
Galaxy’s AI copilot warns when executing SQL against packages that are missing or out of scope and suggests the correct SET CURRENT PACKAGE PATH statement before you run the query.
Rebinding updates access paths but usually improves performance by enabling current statistics. Always rebind during maintenance windows in production.