How to move tables into different tablespace ?

This is a discussion on How to move tables into different tablespace ? within the ibm-db2 forums in Other Databases category; Hi, Are there any procedure or commands moving one table into new tablespace from old tablespace , where it has multiple tables in one tablespace ? Here's my scenario for moving sample_table into tablespace_new 1. create tablespace_new 2. create table sample_table_new in tablespace_new 3. Stop user service 4. load sample_table_new from sampe_table 5. drop all relations on sample_table view , trigger, foreign key, constraints. ( It so tricky and hard part , when it got multiple constrains over multiple tables ) 6. Rename sample_table to sample_table_old Rename sample_table_new to sample_table 7. Create all relations to sample_table 8. Start user service 9. Drop sample_table_old Env : AIX ...

Go Back   Database Forum > Other Databases > ibm-db2

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-26-2008, 09:07 PM
Default How to move tables into different tablespace ?

Hi,

Are there any procedure or commands
moving one table into new tablespace from old tablespace , where it
has multiple tables in one tablespace ?


Here's my scenario for moving sample_table into tablespace_new

1. create tablespace_new
2. create table "sample_table_new " in tablespace_new
3. Stop user service
4. load sample_table_new from sampe_table
5. drop all relations on sample_table
view , trigger, foreign key, constraints.
( It so tricky and hard part ,
when it got multiple constrains over multiple tables )

6. Rename sample_table to sample_table_old
Rename sample_table_new to sample_table
7. Create all relations to sample_table
8. Start user service
9. Drop sample_table_old



Env : AIX 5.3/UDB V8.2

Regards
Myoungsoo
Reply With Quote
  #2  
Old 09-02-2008, 06:57 AM
Default Re: How to move tables into different tablespace ?

Hello Myoungsoo,

This link might be of some use to you. Perhaps you could get your
hands on this (although I formally oppose this idea and suggest you
use this guide to roll your own version):

http://doyoudb2.com/sap-related/50-o...r-sap-db2-dbas

Kind Regards,

Frederik

On Aug 27, 2:07*am, mvsmsh wrote:
> Hi,
>
> Are there any procedure or commands
> moving one table into new tablespace from old tablespace , where it
> has multiple tables in one tablespace ?
>
> Here's my scenario for moving sample_table into tablespace_new
>
> 1. create tablespace_new
> 2. create table *"sample_table_new " in tablespace_new
> 3. Stop user service
> 4. load *sample_table_new *from *sampe_table
> 5. drop *all relations *on sample_table
> * * view , trigger, foreign key, constraints.
> * *( It so tricky *and hard part ,
> * * *when it got multiple constrains over multiple tables )
>
> 6. Rename sample_table * * *to sample_table_old
> * *Rename sample_table_new *to sample_table
> 7. Create all relations *to sample_table
> 8. Start user service
> 9. Drop sample_table_old
>
> Env : AIX 5.3/UDB V8.2
>
> Regards
> Myoungsoo


Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 01:31 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.