SELECT TABLE_OWNER,TABLE_NAME,OWNER,INDEX_NAME,INDEX_TYPE,STATUS,
TABLESPACE_NAME
FROM all_indexes WHERE owner NOT IN ('SYS', 'SYSTEM')
AND status != 'VALID'
AND (status != 'N/A'
OR index_name IN(SELECT index_name
FROM all_ind_partitions
WHERE status != 'USABLE'
AND(status != 'N/A' OR index_name IN ( SELECT index_name
FROM all_ind_subpartitions
WHERE status != 'USABLE' ))));
TABLESPACE_NAME
FROM all_indexes WHERE owner NOT IN ('SYS', 'SYSTEM')
AND status != 'VALID'
AND (status != 'N/A'
OR index_name IN(SELECT index_name
FROM all_ind_partitions
WHERE status != 'USABLE'
AND(status != 'N/A' OR index_name IN ( SELECT index_name
FROM all_ind_subpartitions
WHERE status != 'USABLE' ))));
No comments:
Post a Comment