-- -----------------------------------------------------------------------------------
-- File Name    : unusable_indexes.sql
-- Author       : Sachchida Ojha
-- Description  : Displays unusable indexes for the specified schema or all schemas.
-- Requirements : Access to the DBA views.
-- Call Syntax  : @unusable_indexes (schema-name or all)
-- Last Modified: 04/28/2005
-- -----------------------------------------------------------------------------------
SET VERIFY OFF
SELECT owner,
       index_name
FROM   dba_indexes
WHERE  owner = DECODE(UPPER('&1'), 'ALL', owner, UPPER('&1'))
AND    status NOT IN ('VALID', 'N/A')
ORDER BY owner, index_name;
Want to post your scripts here in this blog ? Email it to snojha@gmail.com. You will be rewarded for your scripts if selected by our experts.
Thursday, July 12, 2007
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment