Home » RDBMS Server » Server Administration » how to move a table's tablespace
how to move a table's tablespace [message #58405] Mon, 25 August 2003 00:51 Go to next message
iret
Messages: 2
Registered: August 2003
Junior Member
I just want move a table's tablespace.
example: a table named 'Ta' on table space system, how can move it to tablespace user?
Re: how to move a table's tablespace [message #58406 is a reply to message #58405] Mon, 25 August 2003 01:43 Go to previous messageGo to next message
LT
Messages: 29
Registered: August 2003
Junior Member
I would suggest simply recreating the table in the appropriate table space using the sqlplus syntax.

'create table tablename as select * from ta'

Obviously, in your create table script set the appropriate tablespace and other table creation points.
Doing so will recreate your table and all of the data in the appropriate tablespace. You can then check that everything with the new table is correct and then you can simply drop the old table that is in the wrong tablespace.
Re: how to move a table's tablespace [message #58408 is a reply to message #58406] Mon, 25 August 2003 01:57 Go to previous messageGo to next message
iret
Messages: 2
Registered: August 2003
Junior Member
It's not a good sulotion. I have thounds of tables and have complex relationships between this tables...
my god............
Re: how to move a table's tablespace [message #58409 is a reply to message #58408] Mon, 25 August 2003 04:46 Go to previous messageGo to next message
Vikas Gupta
Messages: 115
Registered: February 2002
Senior Member
Well,

I have not tried this out but someone had adviced me like this:

1. Export the USERS tables.
2. Change the default tablespace of the USER.
3. Ensure that the USER does not have rights on the previous tablespace.
4. Import the tables.

Please try this in your test database only at first.

Regards,

Vikas.
Re: how to move a table's tablespace [message #58412 is a reply to message #58405] Mon, 25 August 2003 05:39 Go to previous messageGo to next message
Kishor
Messages: 11
Registered: February 2003
Junior Member
alter table tab_name move tablespace tablespace_nm
Re: how to move a table's tablespace [message #58442 is a reply to message #58405] Tue, 26 August 2003 19:20 Go to previous message
sai sreenivas jeedigunta
Messages: 370
Registered: November 2001
Senior Member
Alter table tablename tablespace tablespace_name ;

regards
sai
Previous Topic: can someone please help me?
Next Topic: sql loader and conditional statement
Goto Forum:
  


Current Time: Fri Sep 20 09:54:32 CDT 2024