Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009

    Unanswered: Problem with a index clustered, I added a new col

    Hi DB2 word,
    I need you help very fast, I have a Big Table with two index, production Team call me and told: I need a new col into index primary (this col is in the same table), I made this changes and rebuild the table with a new index (he have the same cols and a new col) but when I load the old information and show me this message: "DEFINITION IS INCOMPLETE: TABLE LACKS A PRIMARY INDEX".
    The cuestion is: can I to modify the unload files for to acomodate cols?. what I can do?. this's a productive table, please help me.

    Thanks and best regards.

  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    Please post DB2 version and platform (I guess it is the mainframe version because that requires that you explicitly create an index to support a primary key/unique constraint). Also show us exactly which statements you executed and the exact error message. From your description, I couldn't really follow what you tried and at which step the error popped up.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Dec 2005
    Hi Javier,

    it seems, that your table definition contains a primary key definition.
    CREATE TABLE ... PRIMARY KEY ( column1 , column2 ... )

    If it does, you need an UNIQUE INDEX containing exactly those columns.

    If there is a new column added to the primary key, you must
    1) change the DDL of the create table ... PRIMARY KEY ( column1,column2,column3 ) AND
    2) create a unique index containing exactly those columns

Posting Permissions

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