Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save RichVRed/a3715238dd1d5fbb450d15795352f737 to your computer and use it in GitHub Desktop.

Select an option

Save RichVRed/a3715238dd1d5fbb450d15795352f737 to your computer and use it in GitHub Desktop.
Finding and generating rebuild index SQL statements for unusable indexes in Oracle.
select 'alter index '||OWNER||'.'||INDEX_NAME||' rebuild online;'
from DBA_INDEXES
WHERE STATUS = 'UNUSABLE';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment