|
|
Re: HOW TO MOVE TABLE FROM ONE TABLE SPACE TO OTHER TABLE SPACE [message #215809 is a reply to message #215808] |
Wed, 24 January 2007 00:01 |
Mohammad Taj
Messages: 2412 Registered: September 2006 Location: Dubai, UAE
|
Senior Member |
|
|
Hi,
SQL> select tablespace_name
2 from dba_segments
3 where segment_name = 'DEPT'
4 and owner = 'SCOTT';
TABLESPACE_NAME
------------------------------
USERS
SQL> select index_name,table_name,status
2 from dba_indexes
3 where owner = 'SCOTT'
4 and table_name = 'DEPT';
INDEX_NAME TABLE_NAME STATUS
------------------------------ ------------------------------ --------
PK_DEPT DEPT VALID
SQL> alter table SCOTT.DEPT move tablespace EXAMPLE;
Table altered.
SQL> select index_name,table_name,status
2 from dba_indexes
3 where owner = 'SCOTT'
4 and table_name = 'DEPT';
INDEX_NAME TABLE_NAME STATUS
------------------------------ ------------------------------ --------
PK_DEPT DEPT UNUSABLE
SQL> alter index SCOTT.PK_DEPT rebuild;
Index altered.
SQL> select index_name,table_name,status
2 from dba_indexes
3 where owner = 'SCOTT'
4 and table_name = 'DEPT';
INDEX_NAME TABLE_NAME STATUS
------------------------------ ------------------------------ --------
PK_DEPT DEPT VALID
SQL> select tablespace_name
2 from dba_segments
3 where segment_name = 'DEPT'
4 and owner = 'SCOTT';
TABLESPACE_NAME
------------------------------
EXAMPLE
SQL>
regards
Taj
[Updated on: Wed, 24 January 2007 00:06] Report message to a moderator
|
|
|
|
|
|