I am trying to increase the column length from 500 to 1000 and I get the following error.
ALTER TABLE "WK_BIN" ALTER "TRANSACTIONNAME" SET DATA TYPE VARCHAR(1000)
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0613N The primary key, unique key, or table partitioning key identified by
"BNWK_UK" is too long or has too many columns. SQLSTATE=54008
SQL0613N The primary key, unique key, or table partitioning key
identified by "<name>" is too long or has too many columns.
This error is caused by one of the following:
* The sum of the internal lengths of columns in the PRIMARY KEY clause
or a UNIQUE clause identified by "<name>" exceeds the index key
length limit or the number of columns exceeds the maximum of 64.
Also, a primary key or a unique key cannot be defined using a LONG
VARCHAR column. If the primary key or unique constraint is defined on
a typed table, there is additional index overhead that reduces the
maximum number of specified columns to 63 and limits the length by 4
* The number of columns in the PARTITION BY clause exceeds the maximum
"<name>" is the constraint name, if specified, of the primary key or
unique constraint. If a constraint name was not specified, "<name>" is
the first column name specified in the primary key or unique constraint
clause followed by three periods.
The index key length limit is based on the page size of the tablespace
used by the index:
Max Key Length Page size
For a table partitioning key, "<name>" is the column name of the column
which exceeds the limit.
The statement cannot be processed.
Modify the primary key, unique key or table partitioning key definition
by eliminating one or more key columns to conform to the column limit of
64 and the key length limit.
Increasing the length makes the index too long. Yes you will have to increase the pagesize of the tablespace to get the index bigger.