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 > Problem with a index clustered, I added a new col

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-09, 16:26
Javier_Velasco Javier_Velasco is offline
Registered User
 
Join Date: Feb 2009
Posts: 1
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.
Reply With Quote
  #2 (permalink)  
Old 02-27-09, 04:32
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #3 (permalink)  
Old 02-27-09, 04:35
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
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
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