Index status check


Job details

Name: Index status check
Platform: Oracle
Category: Maintenance
Description: Detecting indexes in status UNUSABLE
Long description: Detecting indexes in status UNUSABLE
Version: 1.5
Default schedule: 5,15,25,35,45,55 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & _priv_read_all_indexes = ‘1′ & maj_version > ‘8′]

Parameters

Name Default value Description
ignore index Indexes we don’t give a warning for. Values for this parameter must be separated with commas (,).
return status 0 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when indexes in status UNUSABLE.

Job Summary

SELECT owner, index_name, index_type, status 
FROM all_indexes 
WHERE status = 'UNUSABLE';

Details of the Monitoring Job

This job operates by scanning all indexes in the specified Oracle instance and identifying any that have a status of ‘UNUSABLE’. It is scheduled to run automatically at regular five-minute intervals. The job acknowledges checks automatically and holds a validity period of one hour.

Report Generation

A report template included within this job generates a document titled “Index status” based on the results of the monitoring. The report displays:

This allows for a clear presentation of all indexes that are not in a ‘VALID’ status.

Special Considerations

Update and Optimization Strategies

Dependencies and Compatibility

The job depends explicitly on internal database structures and assumes specific permissions (noted as ‘_priv_read_all_indexes’). It requires read access to all indexes and is compatible exclusively with Oracle database instances that support the required SQL functionality and schema visibility.

Automated Handling and Error Management

This job involves sophisticated error handling that captures exceptions, logs them, and updates check values for system monitoring utilities, providing robust operational support and proactive maintenance capabilities.