The case when you need to change tablespaces which is wrongly assigned and you want to move those users tables to different tablespace. First identify the tables from database which you want to move:
Select owner,table_name,tablespace_name from dba_tables where owner = 'ORAFIN';
OWNER TABLE_NAME TABLESPACE_NAME
ORAFIN ACCFILE MUJ_FIN_DBF
ORAFIN ACCOUNT_TRN MUJ_FIN_DBF
ORAFIN ACCOUNT_TRN1 MUJ_FIN_DBF
ORAFIN APPLICATION MUJ_FIN_DBF
ORAFIN ASSETS1 MUJ_FIN_DBF
ORAFIN ASSETS1_ALL MUJ_FIN_DBF
ORAFIN ASSETS_ALL MUJ_FIN_DBF
ORAFIN ASSETS_ALL_HI MUJ_FIN_DBF
ORAFIN AUT_DISC MUJ_FIN_DBF
ORAFIN AUT_LABEL MUJ_FIN_DBF
Now you can use alter table command to move that tables to new tableapace. In the case while
moving the tables having index then you need to rebuild the index otherwise no need to do any thing.
Alter table table_name move tablespace KAF_ITGFIN_DBF;
Alter index <index_name> rebuild tablespace new_tablespace_name;
Generally Normal index moved explicitly where as LOB indexes are moved implicityly where as
related constraint will automatically moved to the new tablespace.
Now make sure the new schema is having the new default tablespace or not. Then the next time object is created on new tablespace.
Comments
Post a Comment