If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQL0613N error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-09, 13:13
tudaykumar tudaykumar is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
SQL0613N error

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


Any suggestions? thank you all in advance.
Reply With Quote
  #2 (permalink)  
Old 12-23-09, 13:46
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What DB2 version and OS?

Andy
Reply With Quote
  #3 (permalink)  
Old 12-23-09, 13:56
tudaykumar tudaykumar is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
Version DB2 v9.1.0.4
OS: Linux

Is the only option is to migrate to a tablespace with a higher page size?
Reply With Quote
  #4 (permalink)  
Old 12-23-09, 13:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Code:
SQL0613N  The primary key, unique key, or table partitioning key
      identified by "<name>" is too long or has too many columns.

Explanation:

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
   bytes.
*  The number of columns in the PARTITION BY clause exceeds the maximum
   of 16.

"<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
--------------  ---------
1K              4K
2K              8K
4K              16K
8K              32K

For a table partitioning key, "<name>" is the column name of the column
which exceeds the limit.

The statement cannot be processed.

User response:

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.

 sqlcode: -613

 sqlstate: 54008
Increasing the length makes the index too long. Yes you will have to increase the pagesize of the tablespace to get the index bigger.

Andy
Reply With Quote
  #5 (permalink)  
Old 12-23-09, 14:23
tudaykumar tudaykumar is offline
Registered User
 
Join Date: Nov 2007
Posts: 26
Thank you Andy.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On