Link to home
Start Free TrialLog in
Avatar of Okonita001
Okonita001Flag for United States of America

asked on

Problem defining containers for a DMS(DB managed Sorage) Tablespace. Can you help?

Hello all,

I am on DB29.5 Data Warehouse Edition(DWE)  I am unable to complete a tablespace container definition because of this error:

DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL1757N  A USING clause without an ON DATABASE PARTITION clause is missing.
SQLSTATE=428B1

During SQL processing it returned:SQL1756N  More than one clause specifies containers without the ON NODES clause.  SQLSTATE=428B1
The Tablespace definition that I am using

CREATE LARGE TABLESPACE "DWS_TS_00049_001" IN DATABASE PARTITION GROUP PDPG PAGESIZE 16384 MANAGED BY DATABASE
USING (FILE  '/db2fs1p1/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p1/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p1/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON DBPARTITIONNUMS (1)
USING (FILE  '/db2fs1p2/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p2/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p2/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON DBPARTITIONNUMS (2)
USING (FILE  '/db2fs1p3/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p3/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p3/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON DBPARTITIONNUMS (3)

EXTENTSIZE 16 PREFETCHSIZE AUTOMATIC
BUFFERPOOL BP_16K
OVERHEAD 5.750000 TRANSFERRATE 0.400000
AUTORESIZE YES INCREASESIZE 1 M
MAXSIZE 50M
NO FILE SYSTEM CACHING
DROPPED TABLE RECOVERY ON;

Ok, out of curiosity, I changed the partition parameters as follows:

CREATE LARGE TABLESPACE "DWS_TS_00049_001" IN DATABASE PARTITION GROUP PDPG PAGESIZE 16384 MANAGED BY DATABASE
USING (FILE  '/db2fs1p1/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p1/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p1/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON DATABASE PARTITION (1)
USING (FILE  '/db2fs1p2/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p2/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p2/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON DATABASE PARTITION (2)
USING (FILE  '/db2fs1p3/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p3/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p3/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON DATABASE PARTITION (3)

and got the following error.  
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0104N  An unexpected token "DATABASE PARTITION" was found following
"_00049_001' 300 ) ON".  Expected tokens may include:  "<node_keyword>".
SQLSTATE=42601


Can anyone help me with the correct syntax ASAP?

Thanks everyone


Avatar of momi_sabag
momi_sabag
Flag of United States of America image

try


CREATE LARGE TABLESPACE "DWS_TS_00049_001" IN DATABASE PARTITION GROUP PDPG PAGESIZE 16384 MANAGED BY DATABASE
USING (FILE  '/db2fs1p1/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p1/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p1/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON NODES (1)
USING (FILE  '/db2fs1p2/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p2/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p2/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON NODES (2)
USING (FILE  '/db2fs1p3/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs2p3/bcuaixd/edwd/DWS_TS_00049_001' 300,
       FILE  '/db2fs3p3/bcuaixd/edwd/DWS_TS_00049_001' 300 ) ON NODES (3)
Avatar of Okonita001

ASKER

Thank you for your response. So that I can understand, what is really wrong with the
ON DBPARTITIONNUMS (1) , ON DBPARTITIONNUMS (2) , and ON DBPARTITIONNUMS (3)  parameters?
Most of the tablespaces that we have in this shop are defined that way and I have used it in the shop myself. But this time I am getting the error I have described earlier. I want to be able to explain a change to what you may consider a standard in the shop.
Can you help in this regard? If I can keep the specs the same as most of the other tablespaces (ie ON DBPARTITIONNUMS (1) ), that will be very great.

Thanks


momi_sabag,

I seemed to have solve my problem. We have 24 nodes/partitions in our prod system. Because the tablespace being created was relatively small, I reasoned that I don't need to utilize all 24 parts for this tablespace and chose to use parts 1 to 3. After the upteenth time trying my way, I decided to expand the containers definition to all 24 parts. This is when the definition worked withe ON DBPARTITIONNUMS expression.

My question is this: Can I conclude that if a Db2 DB partitioned system has X number of partitions, must all tablespace definition use all partitions? If true, what is the reason behind it?

ASKER CERTIFIED SOLUTION
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have been able to confirm your explanation of what the source of my problem is. In short, you have to define your tablespace containers to span the number of partition set defined for the partition group. In my case I was trying to use only 3 partitions out of 24 and DB2 did not approve of that. When I striped the definition across all partitions, I was successful.

Thank you Momi_sabaq