Reorg Tables and Indexes_ECOM

Published on September 2017 | Categories: Documents | Downloads: 81 | Comments: 0 | Views: 405
of 3
Download PDF   Embed   Report

Comments

Content

Before -----select name from v$database; col OWNER for a10 col TABLESPACE_NAME for a15 select owner,table_name,tablespace_name from dba_tables where table_name='PC_CRE DIT_CARDS_ENC';

select sum(bytes)/1024/1024 from dba_segments where segment_name='PC_CREDIT_CARD S_ENC';

select TABLESPACE_NAME,sum(bytes)/1024/1024 from dba_free_space where tablespac e_name ='&1' group by tablespace_name;

select table_name,index_name,owner from dba_indexes where table_name='PC_CREDIT_ CARDS_ENC';

col segment_name for a20 col owner for a11 select segment_name,owner,tablespace_name,sum(bytes)/1024/1024 from dba_segments where segment_name in group by segment_name,owner,tablespace_name;

select TABLESPACE_NAME,sum(bytes)/1024/1024 from dba_free_space where tablespac e_name ='&1' group by tablespace_name;

alter table PCPP.PC_CREDIT_CARDS_ENC move tablespace ; alter index

rebuild;

select name from v$database;

BEGIN SYS.DBMS_STATS.GATHER_SCHEMA_STATS ( OwnName => 'PCPP' ,Granularity => 'DEFAULT' ,Options => 'GATHER' ,Gather_Temp => FALSE ,Degree => 8 ,Cascade => TRUE ,No_Invalidate => FALSE); END; /

select last_analyzed,owner,table_name from dba_tables where table_name='PC_CREDI T_CARDS_ENC'; select last_analyzed,owner,index_name from dba_indexes where TABLE_name='PC_CRED IT_CARDS_ENC'; After ------SQL> select name from v$database;

col OWNER for a10 col TABLESPACE_NAME for a15 select owner,table_name,tablespace_name from dba_tables where table_name='PC_CRE DIT_CARDS_ENC';

select sum(bytes)/1024/1024 from dba_segments where segment_name='PC_CREDIT_CARD S_ENC';

select TABLESPACE_NAME,sum(bytes)/1024/1024 from dba_free_space where tablespac e_name ='&1' group by tablespace_name; select table_name,index_name,owner from dba_indexes where table_name='PC_CREDIT_ CARDS_ENC';

col segment_name for a20 col owner for a11 select segment_name,owner,tablespace_name,sum(bytes)/1024/1024 from dba_segments where segment_name in group by segment_name,owner,tablespace_name;

select TABLESPACE_NAME,sum(bytes)/1024/1024 from dba_free_space where tablespac e_name ='&1' group by tablespace_name;

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close