dbTalk Databases Forums  

Admin_table_move - changing partitioning key-inquisitive question

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Admin_table_move - changing partitioning key-inquisitive question in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Arun Srini
 
Posts: n/a

Default Admin_table_move - changing partitioning key-inquisitive question - 09-07-2010 , 12:02 PM






I am using admin_table_move to add a partitioning key (hash) to an
existing table. Here is my command :

call
SYSPROC.admin_move_table('arun','test','','','','' ,'CLIENT_CODE,PROD_ID','','','KEEP,
COPY_USE_LOAD, FORCE','MOVE');


This table doesn't have any indexes. The current partitioning key is
just 'CLIENT_CODE' . I get this error :

db2 ? SQL2105N


SQL2105N The ADMIN_MOVE_TABLE procedure could not be completed
because
a prerequisite for running the procedure was not satisfied.
Reason
code: "<reason-code>".

Explanation:

You can use the SYSPROC.ADMIN_MOVE_TABLE procedure to move data from
one
table space to a another table space. For example, if you have
existing
DMS table spaces that do not have reclaimable storage enabled, you can
migrate that data to new DMS table spaces that have reclaimable
storage
enabled using this procedure. The ADMIN_MOVE_TABLE procedure requires
certain information or objects to exist before it can run
successfully.
The reason code indicates what was not satisfied:


25

A table with a LONG, LOB, structured type, or XML column was
specified to be moved but a unique index (excluding unique
indexes that include an XML column) is not defined on that
table.


We use LOB so I accept the message. I created an unique index on the
two columns and they worked fine. I am just curious why I need to do
this? I could create a hash partitioned table with the same
partitioning keys without indexes and reload the data.

Reply With Quote
  #2  
Old   
Serge Rielau
 
Posts: n/a

Default Re: Admin_table_move - changing partitioning key-inquisitive question - 09-07-2010 , 12:21 PM






On 9/7/2010 1:02 PM, Arun Srini wrote:
Quote:
We use LOB so I accept the message. I created an unique index on the
two columns and they worked fine. I am just curious why I need to do
this? I could create a hash partitioned table with the same
partitioning keys without indexes and reload the data.
DB2 needs to identify rows to keep track which rows have been changed
during teh move process.
Since DB2 cannot compare LOBs and thus not define identity by comparing
all values it needs the index.

Cheers
Serge
--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab

Reply With Quote
  #3  
Old   
Arun Srini
 
Posts: n/a

Default Re: Admin_table_move - changing partitioning key-inquisitive question - 09-07-2010 , 12:48 PM



On Sep 7, 12:21*pm, Serge Rielau <srie... (AT) ca (DOT) ibm.com> wrote:
Quote:
On 9/7/2010 1:02 PM, Arun Srini wrote:> We use LOB so I accept the message. I created an unique index on the
two columns and they worked fine. I am just curious why I need to do
this? I could create a hash partitioned table with the same
partitioning keys without indexes and reload the data.

DB2 needs to identify rows to keep track which rows have been changed
during teh move process.
Since DB2 cannot compare LOBs and thus not define identity by comparing
all values it needs the index.

Cheers
Serge
--
Serge Rielau
SQL Architect DB2 for LUW
IBM Toronto Lab
Thanks Sarge.

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.