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, any of the following steps can be taken to resolve the issue on the DB2 instance.

  1. Ensure that the driver version is correct as specified on our documentation.
  2. Reduce the row length of the table by reducing the length of one or more of the columns.
  3. Assign the table to a table space that uses a larger buffer pool.
  4. Delete the existing database and re-create blank database with correct page size.
  5. Add this configuration to the DB2 instance. This configuration is set to disabled by default. This parameter can be added when the database is created.

    update db cfg using EXTENDED_ROW_SZ ENABLE

Affected Versions

This article applies to Appian 18.3 and later.

Last Reviewed: November 2018