Link to home
Start Free TrialLog in
Avatar of bsippy
bsippy

asked on

Changing table's tablespace

I am using oracle 7.3.4

how can I change the tablespace of a table without having to drop and create it allover?

Any help would b greatly appreciated.
Avatar of awking00
awking00
Flag of United States of America image

Unfortunately, prior to 10g, you have to create a new tablespace, copy all of the objects from the old tablespace and drop the old tablespace. In 10g, you can just issue the command alter tablespace tbs1 rename to tbs2, although there are some restrictions.
Avatar of kripa_odba
kripa_odba

Hi,

   You can move a table from one tablespace to another tablespace

   alter table tblname move Tablespace tablespacename;


eg
 

  My tablename is EMP and my tablespace name is User in which EMP is residing....
  I want to move emp in to another tablespace called DATA then i will issue the following command


  alter table EMP move tablespace DATA;
Avatar of bsippy

ASKER

I have already tried using

'alter table EMP move tablespace DATA'

but it is giving me the error ORA-01735: invalid ALTER TABLE option.

Is there any other way out
I am very sorry for my last post....



 I didnt noticed the 7.3.4


 You can do a table level export and do a import


ASKER CERTIFIED SOLUTION
Avatar of geotiger
geotiger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To move your tables do:

alter table {yourtablename} move tablespace {newtablespace};