The reason for the -204 SQL error in DB2 is an object not found. If you don’t define it in the DB2 subsystem, this SQLCODE can generate for all DB2 objects.
DB2 SQLCode 204
If the error was encountered for a particular version of a native SQL procedure, the name token might return the following information:
name-of-procedure VERSION version-id
For COMMENT or DROP, if the specified object is a package, the implicitly or explicitly specified version of the package is not defined in the Db2 subsystem. If the version ID was not explicitly specified, the statement attempted to process the null version for the identified package, but the null version does not exist. The VERSION clause can be used to specify a specific version to be processed.
For CREATE FUNCTION, the name token can refer to a built-in function that cannot be the source of a user-defined function or cannot be used as the source of a user-defined function in certain conditions
Resolution
- Verify that the object name was correctly specified in the SQL statement, including any required qualifiers. If it is correct, ensure that the object exists in the system before resubmitting the statement.
- Check the application compatibility value that is used by your application to ensure that it is set properly. The behavior of the statement might change based on the application compatibility level.
Related






