Q

Moving table with indexes to another tablespace

Do you know how to move an Oracle table to another tablespace along with its associated indexes? I am having trouble with a LOB moving from tablespace A to B.

Do you know how to move an Oracle table to another tablespace along with its associated indexes? I am having trouble with a LOB moving from tablespace A to B.
To move a table to another tablespace, issue the following command:
ALTER TABLE table_name MOVE TABLESPACE new_ts;
To move an index, use the following:
ALTER INDEX index_name REBUILD TABLESPACE new_ts;
To move the LOB when moving the table, use the following:
ALTER TABLE table_name MOVE TABLESPACE new_ts 
LOB (lob_item) STORE AS (TABLESPACE another_new_ts);
All of this is documented in the SQL Reference Guide.
This was first published in September 2006

Dig deeper on Oracle and SQL

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close