Solved

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

Posted on 2011-03-06
5
1,026 Views
Last Modified: 2012-05-11
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


0
Comment
Question by:Okonita001
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:momi_sabag
ID: 35046388
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)
0
 

Author Comment

by:Okonita001
ID: 35048473
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


0
 

Author Comment

by:Okonita001
ID: 35056244
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?

0
 
LVL 37

Accepted Solution

by:
momi_sabag earned 500 total points
ID: 35056667
no

when you define the tablespace you used
IN DATABASE PARTITION GROUP PDPG

each partition group can contain a different subset of the database partitions,
so in your case, PDPG contains all 24

you can create another partition group which will only contain 1 to 3 and then use it in your definition of the tablespace
0
 

Author Closing Comment

by:Okonita001
ID: 35078954
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL Update query with connected table data 3 59
query question 12 34
SSRS: Why is Visual Studio stripping these properties? 2 39
Shell Script- gzip 5 45
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question