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 > Canot Create Index Urgent

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-04, 05:45
ronenshi ronenshi is offline
Registered User
 
Join Date: Sep 2004
Posts: 33
Canot Create Index Urgent

Hi,

Im tring to create an index/constraint on a table and i get the error:
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL20075 The index or index extension "RUM_END_USERS_GRO1" cannot be created
or altered because the length of "REUG_GROUP_NAME" is more than 255 bytes.
SQLSTATE=54008


STEPS:

CREATE TABLE RUM_END_USERS_GROUPS( REUG_PROFILE_ID BIGINT NOT NULL, REUG_GROUP_ID BIGINT NOT NULL, REUG_GROUP_NAME VARCHAR(260) NOT NULL, REUG_END_USER_ID BIGINT NOT NULL, REUG_TYPE_1 BIGINT, REUG_TYPE_2 BIGINT, REUG_TYPE_3 BIGINT, REUG_STRING_1 VARCHAR(260), REUG_STRING_2 VARCHAR(260) )


ALTER TABLE RUM_END_USERS_GROUPS ADD CONSTRAINT RUM_END_USERS_GRO1 PRIMARY KEY(REUG_PROFILE_ID,REUG_GROUP_ID,REUG_GROUP_NAME, REUG_END_USER_ID)


Is their a way of createing an index / constraint on col greater than 255bytes?

10x
Reply With Quote
  #2 (permalink)  
Old 10-21-04, 06:10
ronenshi ronenshi is offline
Registered User
 
Join Date: Sep 2004
Posts: 33
Please do:

db2set db2_index_2bytevarlen=on
db2stop force
db2start

This will allow you to create index on columns > 255 bytes
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