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 > Table partitioning

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-22-11, 18:39
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
Table partitioning

With table partitioning, does each partition gets its own table ID in the catalog? What happens to the table ID during a partition detach or attach?
Reply With Quote
  #2 (permalink)  
Old 01-22-11, 20:09
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
There is only one row in syscat.tables for a table (with or without table partitions). There is another catalog table which keeps track of the partitions.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 01-22-11, 20:58
db2aix db2aix is offline
Registered User
 
Join Date: Jul 2009
Location: USA
Posts: 50
I see SYSCAT.DATAPARTITIONS. Two columns of interest

DATAPARTITIONID - Identifier for the data partition.
PARTITIONOBJECTID - Identifier for the data partition within the table space.


What is the difference between them? Which one becomes the table ID in SYSCAT.TABLES when a partition gets detached and becomes a stand-alone table?
Reply With Quote
  #4 (permalink)  
Old 01-22-11, 21:38
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
When you detach a partition into a new table, I believe that DB2 just assigns the next available table id, just like whenever any table is created. Why don't you try it?

I don't recall that there is any relation in the catalog between a table created via detach partition, and the original table or information in SYSCAT.DATAPARTITIONS. The way the relationship is normally associated is by careful naming of the table created via detach partition.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 01-24-11, 03:06
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Everything works fine except db2pd
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