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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-23-11, 09:16
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
range partitioning

Hi,
I am learning to implement range partitioning on AIX 5.3, DB2 V9.1. I created a table and then tried knowing which Tablespace it got associated with:

db2 "CREATE TABLE orders(id INT, shipdate DATE) PARTITION BY RANGE(shipdate) ( STARTING '1/1/2006' ENDING '12/31/2006'EVERY 3 MONTHS)"

From syscat.tables, I found TBSPACEID was -6 but there was no such tablespace with this ID in syscat.tablespaces. How do I know which container the data is going into?
Reply With Quote
  #2 (permalink)  
Old 08-23-11, 09:48
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Try:
describe data partitions for table <table name> show detail

You can also query sysibm.sysdatapartitions
Reply With Quote
  #3 (permalink)  
Old 08-24-11, 06:40
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by db2cap View Post
How do I know which container the data is going into?
Wrong question. Using this syntax you get multiple "tables" in 1 tablespace. The tablespace uses 1 or more containers as usual. Nothing special there.
I suppose you wonder about the spead of "tables" in your tablespace. Now we see that db2girl is capable of giving the right anwer to a wrong question ... wow!
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