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 last published in September 2006

Dig Deeper on Oracle and SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close