Monday, July 4, 2011

Index Corruption(Partition)

Identify Coruppted Index using Block ID

SELECT SEGMENT_TYPE,OWNER'.'SEGMENT_NAMEFROM DBA_EXTENTS WHERE FILE_ID = 123 AND 15608 BETWEEN BLOCK_IDAND BLOCK_ID+BLOCKS -1;

Solution:

select INDEX_NAME,INDEX_OWNER,PARTITION_NAME,status,TABLESPACE_NAME from dba_ind_partitions where INDEX_NAMe like '%IND%';
select COLUMN_NAME,INDEX_NAME,TABLE_NAME from dba_ind_columns where INDEX_NAME= 'IND';
select INDEX_TYPE,TABLE_NAME,INDEX_NAME from dba_indexes where index_name= 'IND';
select sum(bytes/1024/1024) from dba_segments where SEGMENT_NAME= 'IND';
select SEGMENT_NAME,SEGMENT_TYPE,TABLESPACE_NAME from dba_extents where SEGMENT_NAME= 'IND_TAB'
drop index scott. IND;
create index scott. IND on scott.IND_TAB (KEY_SEMRFORE93) tablespace users local;

No comments: