You are currently reviewing an older revision of this page.

DRAFT KB-XXXX Error SQLCODE=-670 during schema creation on DB2

Symptoms

The following error is printed in the tomcat-stdOut.log file when Appian tries to create a table on the DB2 database or when Appian is restarted after a successful installation of an Appian instance with a DB2 database:

Caused by: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE record_type (id BIGINT GENERATED BY 
DEFAULT AS IDENTITY NOT NULL, uuid NVARCHAR(255) NOT NULL, name NVARCHAR(255) NOT NULL, plural_name 
NVARCHAR(255) NOT NULL, description NVARCHAR(4000), src_type NVARCHAR(255) NOT NULL, src_uuid NVARCHAR(255) 
NOT NULL, lv_tmpt_expr NVARCHAR(4000) NOT NULL, url_stub NVARCHAR(255) NOT NULL, created_ts BIGINT NOT NULL, 
created_by BIGINT NOT NULL, updated_ts BIGINT NOT NULL, updated_by BIGINT NOT NULL, CONSTRAINT 
PK_RECORD_TYPE PRIMARY KEY (id), CONSTRAINT record_type_uuid_uc UNIQUE (uuid), CONSTRAINT 
record_type_urlstub_uc UNIQUE (url_stub)): DB2 SQL Error: SQLCODE=-670, SQLSTATE=54010, SQLERRMC=32677;;38193, 
DRIVER=4.24.92 at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at
 liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:105) at 
liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1014) at 
liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:998) at 
liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) ... 118 more

Caused by: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-670, SQLSTATE=54010, SQLERRMC=32677;;38193, DRIVER=4.24.92

Cause

The error mentioned above can occur:

  • during table creation
  • on cast specification 
  • when updating tables
  • if the LOB column with INLINE LENGTH clause exceeds the page size limit

Action

To fix the error noticed above, please follow the steps in the order given below to resolve the issue on the DB2 instance.

  1. Ensure that the driver version is correct as specified on our documentation.
  2. If the above mentioned driver version is correct then reduce the row length of the table by reducing the length of one or more of the columns.
  3. If reducing the row length doesn't resolve the issue then assign the table to a table space that uses a larger buffer pool.
  4. Enable the EXTENDED_ROW_SZ configuration on the database per the DB2 documentation.

    update db <TABLE NAME> using EXTENDED_ROW_SZ ENABLE

  5. If the above mentioned steps don't work and if this is a new Appian installation then delete the existing database and re-create blank database with correct page size. Please note that doing so will erase all the data from the database and should only be used for new Appian installations and not any existing installation or upgrade.

Affected Versions

This article applies to Appian 18.3 and later.

Last Reviewed: November 2018