Database Tuning (MOSC)

MOSC Banner

Recreate/Rebuild Index with Constraint

I discovered that we had a number of indexes that should have been defined as UNIQUE. Prior to a scheduled index rebuild, I had a sequence of SQL that would have dropped the index and then create it as a unique index.

However, the drops generated ORA-02429 errors (cannot drop index used for enforcement of unique/primary key).

Is the solution as simple as dropping the constraint, dropping the index, creating the unique index, and alter add the constraint back in?

I am using Oracle 19c.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center