How to resolve Dropping of an index on AA table - SQL Error: ORA-02429

Document ID : KB000110968
Last Modified Date : 13/08/2018
Show Technical Document Details
Introduction:
AA documentation link below calls for dropping of indexes for performance improvement. 

https://docops.ca.com/ca-advanced-authentication/9-0/en/installing/ca-risk-authentication-installation/how-to-deploy-ca-risk-authentication-on-a-single-system/run-the-database-scripts 

On attempting to drop the index 

SQL Error: ORA-02429: cannot drop index used for enforcement of unique/primary key 
02429. 00000 - "cannot drop index used for enforcement of unique/primary key" 
*Cause: user attempted to drop an index that is being used as the 
enforcement mechanism for unique or primary key. 
*Action: drop the constraint instead of the index.
Question:
How to resolve Dropping of an index on AA table - SQL Error: ORA-02429 ? 
Environment:
Database SQL Query

 
Answer:
*** Note any constraint that is defined needs to be dropped as in the example below the Constraint/Primary Key (PK_ARUDS_USERAUDITLOG) is defined on the table ARUDSUSERAUDITLOG. This constraint has to be dropped before dropping the index. The example below uses syntax on a Oracle Database. 


ALTER TABLE ARUDSUSERAUDITLOG
DROP CONSTRAINT PK_ARUDS_USERAUDITLOG;

DROP INDEX PK_ARUDS_USERAUDITLOG;