Solved

How to drop or rebuild a index which is in unusable status, i tried dropping it but its giving an error that such index name is not found, but the table has that index?

Posted on 2011-03-22
5
362 Views
Last Modified: 2012-05-11
How to Drop an unusable index or rebuild it?

i tried the normal rebuild and drop commands , but it did not work, it says such index name could not be found, but i'm seeing the index in the table in unusable status?

0
Comment
Question by:D-pk
5 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
What index type is it?

Did you try FORCING the drop?

drop index indexname force;
0
 

Author Comment

by:D-pk
Comment Utility
I tried using Force , got an error....................

ORA-29862: cannot specify FORCE option for dropping non-domain index

Its a NORMAL INDEX.
0
 
LVL 34

Accepted Solution

by:
johnsone earned 500 total points
Comment Utility
Could it be that the owner of the index is not the owner of the table?  Check those with this query:

select owner, index_name, table_owner, table_name
from dba_indexes
where table_owner = '<own>' and
table_name = '<name>';

0
 

Author Closing Comment

by:D-pk
Comment Utility
The owner of the Index and the table are the same, i guess i don't have the permission to Drop the index.
0
 
LVL 20

Expert Comment

by:Amitkumar Panchal
Comment Utility
Kindly check the following.

1. Is the index created by CREATE INDEX statement?
    Yes, Use the DROP INDEX <INDEXNAME> to drop the index.

2. Is the index created automatically by defining a UNIQUE KEY or PRIMARY KEY constraint on a table?
    Yes,
     a. Disable a constraint using below syntax first and then drop an index.
         ALTER TABLE <TABLENAME> DISABLE constraint <CONSTRAINTNAME>

     OR

     b. Drop a constraint using below syntax first and then drop an index.
         ALTER TABLE <TABLENAME> DROP constraint <CONSTRAINTNAME>
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now