views:

242

answers:

1

Say I have a program that searches a database for columns to modify, as part of a database conversion process.

If I attempt to alter a column with a functional index defined gives the following error:

ORA-30556: functional index is defined on the column to be modified

Looking up the ORA code, the solution is to "Drop the functional index before attempting to modify the column."

Great! So how do I find all the functional indexes on that column?

The user_ind_columns view looks like a good start, but functional indexes have things like "SYS_NC00042$" in their COLUMN column. Looking around the other user_ views, I'm not seeing anything obvious. Am I missing something?

Or am I going about this the wrong way entirely?

+4  A: 

The table user_ind_expressions describes expressions of function based indexes.

Oracle 11.2 link

Regards
K

Khb
I was hoping for just the column name, but I suppose using `like '%COLUMN_NAME%' has a resonably low probability of false positives (which aren't much of a tragedy anyway).
Darcy Casselman
I don't know of a better way.
Khb