Unix Technical Forum

Moving tables to new schema

This is a discussion on Moving tables to new schema within the DB2 forums, part of the Database Server Software category; --> I currently have 500 tables in 1 single schema. I would like to move 250 out of the 500 ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:55 AM
shsandeep
 
Posts: n/a
Default Moving tables to new schema

I currently have 500 tables in 1 single schema.
I would like to move 250 out of the 500 tables into a new schema.
How is this done?
Thanks.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:55 AM
Mehmet Baserdem
 
Posts: n/a
Default Re: Moving tables to new schema

sandeep,

If I'm not wrong, unfortunately you need to export & import those 250
tables.

regards,

Mehmet

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:55 AM
shsandeep
 
Posts: n/a
Default Re: Moving tables to new schema

But isn't it true that schema is just a logical grouping of data objects?
Why do I then physically need to move the entire data alongwith it?

Cheers,
San.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 07:55 AM
Mark A
 
Posts: n/a
Default Re: Moving tables to new schema

"shsandeep" <sandeeprshah@gmail.com> wrote in message
news:bd2d697302a179665d6dfe0e288684ad@localhost.ta lkaboutdatabases.com...
> But isn't it true that schema is just a logical grouping of data objects?
> Why do I then physically need to move the entire data alongwith it?
>
> Cheers,
> San.


In DB2 you can rename the table name, but not the schema name. Just accept
it and move on with your life.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 07:55 AM
Bob [IBM]
 
Posts: n/a
Default Re: Moving tables to new schema

shsandeep wrote:
> But isn't it true that schema is just a logical grouping of data objects?
> Why do I then physically need to move the entire data alongwith it?
>
> Cheers,
> San.
>
>

Would creating an alias for your two-part name help? Have a look at the
create alias statement.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 07:56 AM
Serge Rielau
 
Posts: n/a
Default Re: Moving tables to new schema

shsandeep wrote:
> But isn't it true that schema is just a logical grouping of data objects?

Correct.
> Why do I then physically need to move the entire data alongwith it?

Rename simply hasn't gotten as much attention as it could have.
No technical reason at all.
Note that in DB2 Viper ALTER TABLE ALTER COLUMN has received a lot of
attention which has been much more common requirement.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 07:56 AM
shsandeep
 
Posts: n/a
Default Re: Moving tables to new schema

Viper!!! COME SOON!!
Thanks guys.

Cheers
San.

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 06:00 AM.


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