Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Posts
    35

    Unanswered: 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

  2. #2
    Join Date
    Sep 2004
    Posts
    35
    Please do:

    db2set db2_index_2bytevarlen=on
    db2stop force
    db2start

    This will allow you to create index on columns > 255 bytes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •