I run oracle 11g
and need to move table (tbl1)
from one tablespace (tblspc1)
to another (tblspc2)
. What is the easiest way to do that?
The alter table move command moves rows down into un-used space and adjusts the HWM but does not adjust the segments extents, and the table size remains the same. The alter table move syntax also preserves the index and constraint definitions.
You can move any table to new tablespace in Oracle with following command. ALTER TABLE MEHMET. SALIH MOVE TABLESPACE NEW_TABLESPACE_NAME; You can move lots of tables to the new tablespace with using generate move scripts.
Try this:-
ALTER TABLE <TABLE NAME to be moved> MOVE TABLESPACE <destination TABLESPACE NAME>
Very nice suggestion from IVAN in comments so thought to add in my answer
Note: this will invalidate all table's indexes. So this command is usually followed by
alter index <owner>."<index_name>" rebuild;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With