check_partition_aft_merge.sql

时间:2023-03-10 05:55:31
check_partition_aft_merge.sql

spool ./05_check_partition_aft_merge.log

@/tmp/rda/chk_freets

set echo on feedback on

set pagesize 400

set linesize 200

col owner for a10

col segment_name for a30

col partition_name for a15

col high_value for a50

select s.segment_name,s.partition_name,s.bytes/1024/1024 Mb, t.high_value from dba_segments s , dba_tab_partitions t where s.partition_name = t.partition_name and s.segment_name =t.table_name and s.owner=t.table_owner  and s.owner='EDRDATA' order by 1,2 /

select OWNER,INDEX_NAME,TABLE_NAME from dba_indexes where status='UNUSABLE';

select index_owner,  INDEX_NAME,PARTITION_NAME from dba_ind_partitions where status ='UNUSABLE';

select table_name,PARTITION_NAME,num_rows,AVG_ROW_LEN,BLOCKS from dba_tab_partitions where table_name in ('TEST') order by table_name, partition_name;

spool off