1. Single Table transfer tablespace
Scenario: If a table user is stored in the tablespace oldspace, you must move the table user to the tablespace newspace.
Execute the statement:
Alter table user move tablespace newspace;
Commit;
2. All tables under scott are transferred to the tablespace newspace.
Select 'alter table' | table_name | 'move tablespace newspace; commit ;'
From user_tables where owner = 'Scott'
However, after the table user is moved to the tablespace newspace, will the indexes on the table user be automatically transferred to the tablespace newspace?
3. Index transfer tablespace, for example, the index idx_user on the user table
Alter index idx_user rebuild tablespace newspace
4. All indexes under user scott are transferred to the tablespace newspace.
Select 'alter Index' | index_name | 'rebuild tablespace newspace; commit ;'
From user_indexs where owner = 'Scott'
Author "lelong"