Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
372 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 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35192326
What index type is it?

Did you try FORCING the drop?

drop index indexname force;
0
 

Author Comment

by:D-pk
ID: 35192391
I tried using Force , got an error....................

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

Its a NORMAL INDEX.
0
 
LVL 35

Accepted Solution

by:
johnsone earned 2000 total points
ID: 35192434
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
ID: 35192508
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 21

Expert Comment

by:Amitkumar Panchal
ID: 35192584
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

916 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