If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Partitioning!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-04, 16:03
zip2nagesh zip2nagesh is offline
Registered User
 
Join Date: Jul 2003
Location: Florida
Posts: 16
Partitioning!!!

Hi All,

If we have data spread across 5 partitions, can we move data to a single partition using a db2 utility. Reorg duing load phase - can a column be defaulted to 1? If this can be done, we can default the value of part_id column to 1 and move the data to one partition.

Platform - DB2 V7 on OS/390.

Throw some light on this!!

Thanks,
Nagesh
__________________
Nagesh

Last edited by zip2nagesh; 02-01-04 at 16:35.
Reply With Quote
  #2 (permalink)  
Old 02-01-04, 17:08
quigleyd quigleyd is offline
Registered User
 
Join Date: Nov 2002
Location: Delaware
Posts: 186
Re: Partitioning!!!

You could edit the partiton map and change them all to point to partiton 1 and then run the redistribute utility. But it will do that for all tablespaces in that group.

2nd You could also alter the partiton group so its only on 1 partion,


You could create a newtablespace on partion 1 and then move the tables to that tablespace.
__________________
David Quigley
Reply With Quote
  #3 (permalink)  
Old 02-01-04, 17:51
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Re: Partitioning!!!

If you have other tables in that tablespace I will go with the last option i.e. create the table in new tablespace which spans only one partition.

dollar

Quote:
Originally posted by quigleyd
You could edit the partiton map and change them all to point to partiton 1 and then run the redistribute utility. But it will do that for all tablespaces in that group.

2nd You could also alter the partiton group so its only on 1 partion,


You could create a newtablespace on partion 1 and then move the tables to that tablespace.
Reply With Quote
  #4 (permalink)  
Old 02-01-04, 18:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Partitioning on OS/390 is a totally differently concept. There is no partition map and no partition group like on DB2 LUW.

Check out the alter index statement which allows you change the partition key ranges on the clustering index, and then reorg the tablespace partitions. This will not delete the other unused partitions, even if they have no rows.

You cannot alter the default value for column. You would have to drop and recreate the table. Probably easier to update the table with a DML SQL statement to supply the default value for existing rows, and then modify the application program for new rows inserted (if you don’t want to unload all the data, drop and create the table).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 02-01-04, 18:49
zip2nagesh zip2nagesh is offline
Registered User
 
Join Date: Jul 2003
Location: Florida
Posts: 16
Firstly thanks for a prompt reply.

We have a database in which all of the tables are partitioned and we want to redistribute all the data spread across various partitions to one partition.

Changing the map looks to be an easy option. Can u pls be more elaborative how to go about retreiving the map and changing it.

Thanks,
Nagesh
__________________
Nagesh
Reply With Quote
  #6 (permalink)  
Old 02-01-04, 18:57
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Nagesh ..

David Quigley and Dollar have assumed that you are using DB2 EEE on LUW ...

Marcus_A has given the solution for your platfrom

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #7 (permalink)  
Old 02-01-04, 19:01
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
My apologies for the wrong understanding. I have to remind myself to use right glasses next time

dollar


Quote:
Originally posted by sathyaram_s
Nagesh ..

David Quigley and Dollar have assumed that you are using DB2 EEE on LUW ...

Marcus_A has given the solution for your platfrom

HTH

Sathyaram
Reply With Quote
  #8 (permalink)  
Old 02-01-04, 19:53
zip2nagesh zip2nagesh is offline
Registered User
 
Join Date: Jul 2003
Location: Florida
Posts: 16
Thanks All for ur valuable suggestions

Nagesh
__________________
Nagesh
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On