Avatar of Java Developer
Java DeveloperFlag for United States of America asked on

ORA-01502: Index or partition of such index is in unusable state.

I get below Error inserting data in the table with 1 primary key and 3 foreign keys:

ORA-01502: Index '<schema.table_names_primary_key>' or partition of such index is in unusable state.

Open in new window


1st row below is the Primary key index & I do not know the Partition.


Why is this happening & How to fix this issue?



Oracle Database* Oracle PL/SQL* Oracle12c

Avatar of undefined
Last Comment
Java Developer

8/22/2022 - Mon
Alex [***Alex140181***]

You may query
- DBA_PART_INDEXES
- ALL_PART_INDEXES
- USER_PART_INDEXES
for information about the partitioned indexes (and its names)...

Then, you could try:
alter index index_name rebuild partition partition_name;

Open in new window


http://www.dba-oracle.com/t_ora_01502_index_string_string_or_partition_of_such_index_is_in_usable_state.htm
ASKER
Java Developer

What query to write to get the partition name of this index?
Why it happened? How 


Alex [***Alex140181***]

select *
  from user_part_indexes a
 where a.table_name = '<here goes the table name>';

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Alex [***Alex140181***]

ASKER CERTIFIED SOLUTION
Java Developer

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question