Results 1 to 8 of 8

Thread: Partitioning!!!

  1. #1
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    16

    Unanswered: 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
    Last edited by zip2nagesh; 02-01-04 at 17:35.
    Nagesh

  2. #2
    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

  3. #3
    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

    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.

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  5. #5
    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

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  7. #7
    Join Date
    Sep 2002
    Posts
    456
    My apologies for the wrong understanding. I have to remind myself to use right glasses next time

    dollar


    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

  8. #8
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    16
    Thanks All for ur valuable suggestions

    Nagesh
    Nagesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •