473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Help with using database partition expressions

Dear DBAs

I'm working on a DPF set up in DB2 LUW on AIX and trying to create a tablespace in 16 partition database (logical) using partition expression (http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=%2Fcom.ibm.db2.luw.admin.partition .doc%2Fdoc%2Fc0059241.html).
Verison is DB2 v9r7.


Expand|Select|Wrap|Line Numbers
  1. CREATE USER TEMPORARY TABLESPACE "TBSPNAME" IN DATABASE PARTITION GROUP PG1_ALL PAGESIZE 16384 MANAGED BY SYSTEM
  2.        USING ('/db2/idbname/dbname/db2 $N /CONT0001/TBSPNAME',
  3.               '/db2/idbname/dbname/db2 $N /CONT0002/TBSPNAME',
  4.               '/db2/idbname/dbname/db2 $N /CONT0003/TBSPNAME',
  5.               '/db2/idbname/dbname/db2 $N /CONT0004/TBSPNAME',
  6.               '/db2/idbname/dbname/db2 $N /CONT0005/TBSPNAME')
  7.          EXTENTSIZE 32
  8.          PREFETCHSIZE AUTOMATIC
  9.          BUFFERPOOL BP_16K_TMP
  10.          OVERHEAD 7.500000
  11.          TRANSFERRATE 0.060000
  12.          NO FILE SYSTEM CACHING
  13.          DROPPED TABLE RECOVERY OFF;
This is working fine and creating the tablespace with container paths as below. Example for NODE5
Expand|Select|Wrap|Line Numbers
  1. '/db2/idbname/dbname/db25/CONT0001/TBSPNAME'         
  2. '/db2/idbname/dbname/db25/CONT0002/TBSPNAME'
  3. '/db2/idbname/dbname/db25/CONT0003/TBSPNAME'
  4. '/db2/idbname/dbname/db25/CONT0004/TBSPNAME'
  5. '/db2/idbname/dbname/db25/CONT0005/TBSPNAME'
However, when I try to create the same using the feature [blank]$[number]N (mentioned below) and the command below. Command is failing with below error
"SQL0294N The container is already in use. SQLSTATE=42730"

Expand|Select|Wrap|Line Numbers
  1. The database partition number in the following examples is assumed to be 10.
  2. [blank]$[number]N (Syntax) --> "$4N" (Example) --> 0010 (Value)
Expand|Select|Wrap|Line Numbers
  1. CommandCREATE USER TEMPORARY TABLESPACE "TBSPNAME" IN DATABASE PARTITION GROUP PG1_ALL PAGESIZE 16384 MANAGED BY SYSTEM
  2.        USING ('/db2/idbname/dbname/db2 $4N /CONT0001/TBSPNAME',
  3.               '/db2/idbname/dbname/db2 $4N /CONT0002/TBSPNAME',
  4.               '/db2/idbname/dbname/db2 $4N /CONT0003/TBSPNAME',
  5.               '/db2/idbname/dbname/db2 $4N /CONT0004/TBSPNAME',
  6.               '/db2/idbname/dbname/db2 $4N /CONT0005/TBSPNAME')
  7.          EXTENTSIZE 32
  8.          PREFETCHSIZE AUTOMATIC
  9.          BUFFERPOOL BP_16K_TMP
  10.          OVERHEAD 7.500000
  11.          TRANSFERRATE 0.060000
  12.          NO FILE SYSTEM CACHING
  13.          DROPPED TABLE RECOVERY OFF;
Moreover the expected paths for this command is below
Expand|Select|Wrap|Line Numbers
  1. '/db2/idbname/dbname/db20005/CONT0001/TBSPNAME'         
  2. '/db2/idbname/dbname/db20005/CONT0002/TBSPNAME'
  3. '/db2/idbname/dbname/db20005/CONT0003/TBSPNAME'
  4. '/db2/idbname/dbname/db20005/CONT0004/TBSPNAME'
  5. '/db2/idbname/dbname/db20005/CONT0005/TBSPNAME'

Please help me in identifying the issue and fixing this.
May 12 '13 #1
7 2558
your comand is not right
for example
Expand|Select|Wrap|Line Numbers
  1. create regular tablespace TBS_BIGTBL_4K in database partition group pgr01 
  2.    pagesize 4096 managed by database 
  3.    using (DEVICE ' /dbvols/tbs_bigtbl_4k/p0cont1' 38G) on dbpartitionnum (0) 
  4.    using (DEVICE ' /dbvols/tbs_bigtbl_4k/p1cont1' 38G) on dbpartitionnum (1) 
  5.    extentsize 16 prefetchsize 32 bufferpool BP4K
  6.  
May 13 '13 #2
hi forrest

Thank you for the reply.
I've used the command with minor modification $N in place of $4N and it worked fine. I believe the command is right and I'm not sure of how to use the partition expression in my requirement and seeking the help here.
May 13 '13 #3
Do you want to add the partition?
May 14 '13 #4
Hi Forest

I'm trying to create a tablespace in db2 database with dpf enabled.

so my expectation is the as per the IBM link specified, it shall create the containers as per the partition numbers with a maximum of 4 digits ([blank]$[number]N)
May 14 '13 #5
[blank]$N " $N" 5
[blank]$N+[number] " $N+1011" 1016
[blank]$N%[number] " $N%3" (% 是模块) 2
[blank]$N+[number]%[number] " $N+12%13" 4
[blank]$N%[number]+[number] " $N%3+20" 22





'/dbdir/node $N /cont1' '/dbdir/node5/cont1'
'/ $N+1000 /file1' '/1005/file1'
' $N%10 /container' '5/container'
'/dir/ $N%5+2000 /dmscont' '/dir/2000/dmscont'
May 14 '13 #6
hi Forrest

I'm looking for case where in i shall be able to use only [blank]$[number]N. This would be something like below $4N which means for a partition 5 it would be something like 0005 which is not working as specified in the link i mentioned at the beginning of my post.

Thanks,
May 14 '13 #7
$4N is equal your parartition number

you is connectting the db parttion is 5

there is no blank after the $4N
May 15 '13 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Srihari | last post by:
I'm trying to develop a tree structure using javascript. The node values of the tree are generating from a mysql table depending on login. The tree structure contains 3 sub levels. I developed...
0
by: Jacob Pallapati | last post by:
Hi, I have a trigger in which I build a String from the contents of a table. In a stored procedure I would use a cursor which would look like: set str_to_build = ''; create c1 cursor for...
0
by: Deepak Rao G | last post by:
Hi All , I have a UDB 8.1 to look after, when i check on the DB partition groups, it shows me only 2 groups ( as shown below) & misses IBMTEMPGROUP !! I checked the IBM official...
3
by: to_rgoyal | last post by:
Hi All, I am creating one web base application using ASP.net and C#. I am populating dropdown lists of my web pages using database. I am using this code: con = new...
2
by: Mr. X. | last post by:
Hello, I need a basic sample for using database (connecting ... reading from database ... using dataset & datagridview), please. Thanks :)
0
Kosal
by: Kosal | last post by:
Hi Please help me to create AdRotator using Database Access in ASP.NET if everyone can because I don't know how to create table AdList in access and how to contect to access and get data from...
1
by: tina2626 | last post by:
how can i pass textbox value to gridview using C#.net at runtime not using database values. i m hving textbox1 and gridview1. can anyone suggest me to do this coding in ASP.NET(C# language).
0
by: basissathish | last post by:
Hi, I would like to add a DB2 database partition in different drive eg: existing DB partition drive H, now we need to add drive J please help me on this, looking for the earliest reply ...
0
by: Venkat G | last post by:
How to find no. of hash partitions per database partition, of a table, in partitioned database environment?
1
by: Abhay Gupta | last post by:
I want to block some websites with using database(Mysql). If i enter the name or url of the website into the database then nobody can access this website.Is it possible?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.