Unix Technical Forum

Creating db in 2 partitions out of 8

This is a discussion on Creating db in 2 partitions out of 8 within the DB2 forums, part of the Database Server Software category; --> Hi I am having a requirement to create a db in 2 out of 8 partitiones. I have the ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 12:08 PM
arunrocks@gmail.com
 
Posts: n/a
Default Creating db in 2 partitions out of 8

Hi
I am having a requirement to create a db in 2 out of 8 partitiones.
I have the following doubts.
1. should I create a new instance in 2 partitions alone (the present
instance spans 8 nodes)
2. or is there a way to create the db in 2 out of 8.
If I have to create a new instance, (its a BCU from IBM)
I;d be happy if someone would link a material (1st time I am working
in a partitioned env)
Should I execute db2icrt in each of the nodes??
Please help.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 12:08 PM
prakash56
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

On Apr 10, 8:50 pm, arunro...@gmail.com wrote:
> Hi
> I am having a requirement to create a db in 2 out of 8 partitiones.
> I have the following doubts.
> 1. should I create a new instance in 2 partitions alone (the present
> instance spans 8 nodes)
> 2. or is there a way to create the db in 2 out of 8.
> If I have to create a new instance, (its a BCU from IBM)
> I;d be happy if someone would link a material (1st time I am working
> in a partitioned env)
> Should I execute db2icrt in each of the nodes??
> Please help.


Hi,

AFAIK with version 8 (LUW);
only option to address your requirement is the first option as already
mentioned by you.

> Should I execute db2icrt in each of the nodes??

It depends if you are using single servers or multiple servers;
for a multipartitioned database on a single machine: you only have to
create a single instance (db2icrt) with the relevant entries in $HOME/
sqllib/db2nodes.cfg

Following is a good link to start with:
http://www-128.ibm.com/developerwork.../dm-0507desai/

Cheers
Prakash Gautam

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 12:08 PM
arunrocks@gmail.com
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8


Thanks Prakash. This is a fresh start in new direction for me.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 12:08 PM
Knut Stolze
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

arunrocks@gmail.com wrote:

> Hi
> I am having a requirement to create a db in 2 out of 8 partitiones.
> I have the following doubts.
> 1. should I create a new instance in 2 partitions alone (the present
> instance spans 8 nodes)
> 2. or is there a way to create the db in 2 out of 8.
> If I have to create a new instance, (its a BCU from IBM)
> I;d be happy if someone would link a material (1st time I am working
> in a partitioned env)


You could create the database on all 8 partitions, then adjust the partition
groups to include only the two partitions you want.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 12:08 PM
arunrocks@gmail.com
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

On Apr 11, 10:10 am, Knut Stolze <sto...@de.ibm.com> wrote:
> arunro...@gmail.com wrote:
> > Hi
> > I am having a requirement to create a db in 2 out of 8 partitiones.
> > I have the following doubts.
> > 1. should I create a new instance in 2 partitions alone (the present
> > instance spans 8 nodes)
> > 2. or is there a way to create the db in 2 out of 8.
> > If I have to create a new instance, (its a BCU from IBM)
> > I;d be happy if someone would link a material (1st time I am working
> > in a partitioned env)

>
> You could create the database on all 8 partitions, then adjust the partition
> groups to include only the two partitions you want.
>
> --
> Knut Stolze
> DB2 z/OS Utilities Development
> IBM Germany


This is what I am doing now. thank you

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 12:08 PM
Ian
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

Knut Stolze wrote:
> arunrocks@gmail.com wrote:
>
>> Hi
>> I am having a requirement to create a db in 2 out of 8 partitiones.
>> I have the following doubts.
>> 1. should I create a new instance in 2 partitions alone (the present
>> instance spans 8 nodes)
>> 2. or is there a way to create the db in 2 out of 8.
>> If I have to create a new instance, (its a BCU from IBM)
>> I;d be happy if someone would link a material (1st time I am working
>> in a partitioned env)

>
> You could create the database on all 8 partitions, then adjust the partition
> groups to include only the two partitions you want.
>


The problem is that you can't really do this. IBMTEMPGROUP is a
"hidden" (in the sense that it doesn't appear in syscat.nodegroups)
database partition group that includes ALL partitions in your instance.
All system temporary tablespaces exist in IBMTEMPGROUP (you can't get
away from this).

So, while you can restrict the data in a database to a single (or pair)
of partitions, your database still spans all partitions in the instance.
And you still need to back up all partitions.

So, your best option is to create a second instance that has only 2
partitions.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 12:09 PM
arunrocks@gmail.com
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

Hi All
Thank you for advising me onthis. I have did what you guys told,
put data in a partition map spanning 2 nodes. Now I have different
doubt.
In windows, if I change a db cfg and it needs me to restart - SQL1363W
msg, I can go into control center and actually see if the changes are
'Done' or are 'PENDING'.
Is there a way in linux to do the same?

Thank you
Arun

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 12:09 PM
Lennart
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

arunrocks@gmail.com wrote:
[...]
> In windows, if I change a db cfg and it needs me to restart - SQL1363W
> msg, I can go into control center and actually see if the changes are
> 'Done' or are 'PENDING'.
> Is there a way in linux to do the same?
>


I assume you can do the same with the control center in linux (dont know
though). But here is how you can do it from the shell:

db2 connect to <db>
db2 get db cfg show detail | less -S

You'll get one column for "Current Value", and one for "Delayed Value"

/Lennart

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 12:09 PM
Ian
 
Posts: n/a
Default Re: Creating db in 2 partitions out of 8

arunrocks@gmail.com wrote:
> Hi All
> Thank you for advising me onthis. I have did what you guys told,
> put data in a partition map spanning 2 nodes. Now I have different
> doubt.
> In windows, if I change a db cfg and it needs me to restart - SQL1363W
> msg, I can go into control center and actually see if the changes are
> 'Done' or are 'PENDING'.
> Is there a way in linux to do the same?
>


Connect to the database, and

db2 get db cfg for <yourdb> show detail



This will show "current" and "delayed" values. Delayed = value for next
restart.

Or use db2pd -db <yourdb> -dbcfg, and compare memory value (active) and
disk value (config file - next restart).


Also, in a partitioned database, remember that the database
configuration is unique for each partition. So make sure you update the
config on all partitions (when applicable).

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com