Question

I have created two indexes on different materialized views with the same name in TimesTen and now cannot drop neither of them. If try to I get the following error message:

2222: Index name is not unique

Could you please advise me how could I get rid of one (or at least both) of these indexes?

Thank you!

Was it helpful?

Solution

Oracle doesn't permit the creation of index with the same name in the same schema. Are your indexes in seperate schemas? if Yes, then please specify your schema.index_name while deletion.To check the schemas of index , you can query all_indexes.

select * from all_indexes where index_name = 'put your index name here';

Then you can log in to one of the schemas and run delete schema_name.index_name. It must be a privilege issue hence you are getting an error

OTHER TIPS

To drop indexes for Materialized Views [or tables] of the same name in two different schemas, you need to either:

  1. Log into the first schema and drop the MV index Log into the second schema and drop the MV index
  2. As the instance administrator [the OS user who you installed TimesTen as] and qualify the index to be dropped by the schema. eg

    ttIsql yourDbDSN drop schema1.index; drop schema2.index;

Specify the table name (or materialized view name) in the drop index query.

It should work.

Ex. like below.

DROP INDEX schema_name.index_name_01 FROM schema_name.table_name_01;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top