An AddOn installation might fail if a prepared statement
in the prepared server cache of an application server references the
specified database table.
Symptoms
The installation of an AddOn into an object store that
uses a DB2® for z/OS® database
fails. The installation returns an exception message that indicates
the database table is currently referenced by a prepared statement
and cannot be altered.
Causes
Installing an AddOn into an object store that uses
DB2 for z/OS might fail when a prepared
statement that is stored in the prepared statement cache of the application
server references the affected database table. This reference maintains
an active association to the referenced table and thus prevents any
schema modifications from occurring.
For example, a -904 resource
exception message with the reason code of SQLERRMC=00E70081 indicates the table associated with the ALTER TABLE statement (DocVersion)
is currently referenced by a prepared statement that is stored in
the prepared statement cache and therefore, it cannot be altered.
2008-10-08T06:25:07.204Z 291E291E API FNRCE0230E - ERROR An error occurred
accessing the database. ErrorCode: -904, Message: 'DB2 SQL Error: SQLCODE=-904,
SQLSTATE=57011,SQLERRMC=00E70081;00000A00;A12BASE.DOCVERSION, DRIVER=3.51.118'
SQL: vargraphic(1200) "\ncom.filenet.api.exception.EngineRuntimeException:
DB_ERROR: An error occurred accessing the database.
ErrorCode: -904, Message: 'DB2 SQL Error: SQLCODE=-904, SQLSTATE=57011,
SQLERRMC=00E70081;00000A00;A12BASE.DOCVERSION, DRIVER=3.51.118'
SQL: "ALTER TABLE DocVersion ADD COLUMN uee8_rmentitydescription vargraphic(1200)"
Resolving the problem
Disable the prepared statement cache for the XA data source
of the affected object store. Additionally, ensure the
DB2 for z/OS CACHEDYN subsystem parameter is set to YES.
To disable the prepared statement
cache for the XA data source of the object store:
- Go to the prepared statement cache for the XA data source of the
affected object store.
- Make a note of this current statement size value to use when you
reset it.
- Disable the prepared statement cache for the XA data source of
the affected object store by setting the statement size to 0.
- Set the DB2 for z/OS CACHEDYN subsystem parameter to YES if needed.
- Run the AddOn installation.
- In the prepared statement cache for the XA data source of the
affected object store, reset the statement size to its previous value.