1. 테이블에 대한 테이블스페이스 이동 :
SQL> alter table
alter table dept move tablespace tools ; (users --> tools)
SQL> select table_name, tablespace_name
2 from user_tables
3 where table_name like 'DEPT%'
TABLE_NAME TABLESPACE_NAME
------------------ ------------------------------
DEPT USERS
DEPT_1 USERS
DEPT_2 USERS
SQL> alter table dept_1 move tablespace tools;
Table altered.
SQL> select table_name, tablespace_name
2 from user_tables
3 where table_name like 'DEPT%'
TABLE_NAME TABLESPACE_NAME
------------------ ------------------------------
DEPT USERS
DEPT_1 TOOLS
DEPT_2 USERS
2. 인덱스에 대한 테이블스페이스 이동 : 인덱스를 Rebuild 한다
SQL> alter index
alter index pk_dept rebuild tablespace tools ; (users --> tools)
SQL> select index_name, tablespace_name
2 from user_indexes
INDEX_NAME TABLESPACE_NAME
------------------------------ ------------------------------
PK_DEPT TOOLS
PK_EMP USERS
SQL> alter index pk_dept rebuild tablespace users;
Index altered.
SQL> select index_name, tablespace_name
2 from user_indexes
INDEX_NAME TABLESPACE_NAME
------------------------------ ------------------------------
PK_DEPT USERS
PK_EMP USERS