Unanswered: Primary key depends on the wrong index
We have a utility that drops and creates db objects.
This utility has a priority of actions and it depends on the fact the a primary key has a matching index with the same name.
We have a case of table x(a number, b number) with a primary key pk on (a) and an index idx on (a, b).
After an export and import we have a case that the primary key, pk depends on the index idx instead of the pk index, which makes the drop of the idx index impossible.
I have two questions:
1. What system views I should query in order to find the relation between pk constraint and x index?
2. Is there a way to avoid this from happening while export/import in some way, say define the pk in another way?