Commands That Cause Indexes To Become Unusable

This is a short list of most common commands that cause an index or index partition is marked unusable.

  • Direct path SQL*Loader
  • Import partition
  • Alter table move
  • Alter table <table-name> truncate partition
  • Alter table <table-name> split partition
  • Alter index <index-name> split partition

 

The solution is rebuild the index (with alter index rebuild command) or partition, but you can manage this situations with;

i) SKIP_UNUSABLE_INDEXES Parameter

  • TRUE Disables error reporting of indexes and index partitions marked UNUSABLE (ORA-01502), be careful it can perform FTS (by default in 12c)
  • FALSE RAISE the ora-01502, doesn’t allow DML on tables with unusable indexes o index partitions

ii) TRUNCATE TABLE (if possible) put index usable

 
HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s