Monday, June 2, 2014

ORA-01418: specified index does not exist

Very simple issue :)
There was this table which we were back loading about 14 billion rows while disabling the PK and when all is done, the next step was to start GoldenGating to replicate the live data and fun started.

As mentioned this table has about 14 billion records with about 700GB. So, enabling PK is not going to be fun (dont want to use novalidate) - took about close to 12 hours but didn't finish.

Best and the fasted way is to create an index first (unique or non-unique) with parallel and nologging and then enable the Primary Key using that index.

So, tried to create an index and see that there is already one index created on the very same column.

Well then lets use that index, so issued below:
alter table schema_name.table_name enable constraint table_name_pk using index index_name;
*
ERROR at line 1:
ORA-01418: specified index does not exist

What??? That index exists so what's the issue?

I was trying to enable that constrain by logging as my user and figured it got to be something to do with privs. So, logged in as the schema owner and ran the script and it runs fine.


No comments:

Post a Comment