By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,278 Members | 1,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,278 IT Pros & Developers. It's quick & easy.

Creating a DB on a partition environment

P: n/a
Hai all,

I have Db2 installed in a partition environment . There are 4 partitons
on which i created the instance. can any one tell me if i can create a
database on the required partitons ......

that is i want to create the db on 1,3,4 partitons.

Oct 10 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a

Gladiator wrote:
Hai all,

I have Db2 installed in a partition environment . There are 4 partitons
on which i created the instance. can any one tell me if i can create a
database on the required partitons ......

that is i want to create the db on 1,3,4 partitons.
Use CREATE DATABASE PARTITION GROUP yyyy to create a group for these
partitions then
CREATE REGULAR TABLESPACE xxxxxx IN DATABASE PARTITION GROUP yyyy

Oct 10 '06 #2

P: n/a

mcteard wrote:
Gladiator wrote:
Hai all,

I have Db2 installed in a partition environment . There are 4 partitons
on which i created the instance. can any one tell me if i can create a
database on the required partitons ......

that is i want to create the db on 1,3,4 partitons.

Use CREATE DATABASE PARTITION GROUP yyyy to create a group for these
partitions then
CREATE REGULAR TABLESPACE xxxxxx IN DATABASE PARTITION GROUP yyyy


hai mcteard,

Thanks for the reply... but i have asked for Creating a Database......
tht is when i am giving the Create DB stmt ... can i specify to create
on my required partitions ??? and not on all the partitions ????

Oct 10 '06 #3

P: n/a
Gladiator wrote:
Thanks for the reply... but i have asked for Creating a Database......
tht is when i am giving the Create DB stmt ... can i specify to create
on my required partitions ??? and not on all the partitions ????
You are creating the DB only on those partitions that are in the specified
partition group - not on all partitions. If the partition group is
comprised of 1 partition only, then the DB is created just on that
partition.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 10 '06 #4

P: n/a

Knut Stolze wrote:
Gladiator wrote:
Thanks for the reply... but i have asked for Creating a Database......
tht is when i am giving the Create DB stmt ... can i specify to create
on my required partitions ??? and not on all the partitions ????

You are creating the DB only on those partitions that are in the specified
partition group - not on all partitions. If the partition group is
comprised of 1 partition only, then the DB is created just on that
partition.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany

Sorry Knut Stolze

I am a bit confused........ But we create a partition group after
creating a db right ??........

how can u specify creating a DB on a partition group.....
Please do explain mee..
Regards
Kamal

Oct 10 '06 #5

P: n/a
Ian
Gladiator wrote:
>
hai mcteard,

Thanks for the reply... but i have asked for Creating a Database......
tht is when i am giving the Create DB stmt ... can i specify to create
on my required partitions ??? and not on all the partitions ????
You can't create a database on fewer partitions than exist in the
db2nodes.cfg file.

You can effectively eliminate the partitions you don't care about
after creating the database by creating a new partition group and
then (re)creating the tablespace(s) you want in the new partition
group.

However, realize that any temporary tablespaces MUST exist on all
database partitions.

The database on the partitions with no data may never get activated
though, which is why I said you can "effectively" eliminate the
partitions.

Also note that backup/restore will need to include these non-active
partitions.
If you really want a database with fewer partitions, then you should
create a new instance with the desired number of partitions.
Oct 10 '06 #6

P: n/a
Gladiator wrote:
I am a bit confused........ But we create a partition group after
creating a db right ??........
Sorry, my fault: That happens if I just post from not-so-clear memory
instead of double-checking... You are correct: partition groups are a
thing specific to a single database.

As Ian said, the database is always created on all partitions and then you
can modify the partition groups to exclude those partitions that you don't
want to use.

An alternative may be to stop DB2, modify the sqllib/db2nodes.cfg file
manually, so that it only lists the partitions that you want to use. Next
you start DB2 - it will only start on the partitions in the db2nodes.cfg.
Now you can create the database. Finally, you restart DB2 with the
restored original db2nodes.cfg file.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 11 '06 #7

P: n/a
Knut Stolze wrote:
An alternative may be to stop DB2, modify the sqllib/db2nodes.cfg file
manually, so that it only lists the partitions that you want to use. Next
you start DB2 - it will only start on the partitions in the db2nodes.cfg.
Now you can create the database. Finally, you restart DB2 with the
restored original db2nodes.cfg file.
I forgot to mention that this won't be supported. So if something doesn't
work, you're on your own.

At least a DROP DB already complains about databases that don't exist on all
partitions. This is just a warning and not an error, but other tools and
functions may not take it so lightly: SQL1228W DROP DATABASE has
completed but the database alias name or database name "TEST_DB" could not
be found on "1" nodes.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 11 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.