Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

specifying index tablespace while enabling disabling primary key constraint

User_8P4FCFeb 5 2013 — edited Feb 6 2013
hello,
during ETL i want to disable the PK/UK constraints to speed up the load;
on the enabling of the constraint, the corresponding indexes are created in a different tablespace then they were originaly on the creation of the table itself
i tried to disable the PK/UK's with option 'keep index' , set corresponding indexes to 'unusuable' status, and use 'alter session set skip_unusable_indexes = true' , but then i cannot insert rows with the error
Error: ORA-01502: index 'xxx' or partition of such index is in unusable state
can anyone advise if there is a way to either enable the PK/UK constraint and specify the tablespace for the corresponding indexes, or to keep the index and make the inserts work?
id like to avoid dropping the constraints / indexes and recreating both from the scratch after the load
i appreciate any tips
thanks
rgds
This post has been answered by unknown-7404 on Feb 5 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2013
Added on Feb 5 2013
3 comments
2,989 views