http://download.oracle.com
According to Oracle it does invalidate.
Main Topics
Browse All TopicsIs there an easy way to replace a unique indexed primary key with a non-unique index without invalidating objects?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
http://download.oracle.com
According to Oracle it does invalidate.
DROP INDEXPurpose
Use the DROP INDEX statement to remove an index or domain index from the database.
When you drop an index, Oracle Database invalidates all objects that depend on the underlying table, including views, packages, package bodies, functions, and procedures.
When you drop a global partitioned index, a range-partitioned index, or a hash-partitioned index, all the index partitions are also dropped. If you drop a composite-partitioned index, all the index partitions and subpartitions are also dropped.
Sounds like not just partitioned.
regular but could be partitioned as well. Obviously, to allow duplicates in certain conditions so that jobs don't break within etl and to tweak the constraints as needed.
Sounds like from what I am reading we should be defining our pk constraints with non-unique indexes so we have more control/flexibility in the future.
Invalidation due to dropping and recreating an index is not something that should worry you. Oracle recompiles invalid objects for you, on demand, or you can manually recompile using utlrp.sql or exec dbms_utility.compile_schem
There is no way to drop + create indexes without Oracle using standard procedure, which is to invalidate dependencies which will then be recompiled.
But it doesn't mean you shouldn't do it. Nowhere do the docs say "invalidation of objects is bad", it is just part of Oracle's architecture.
Thanks for the info, I do appreciate the effort...but not what the post question asked. It's not that it "worries" us to drop an index, it's just too much overhead and not flexible...the most flexible solution is to create non-unique indexes.
That was the question in this post...not whether or not we should drop an index!
Will share the points anyway!
Thanks
http://dbaforums.org/oracl
>>It's not that it "worries" us to drop an index, it's just too much overhead and not flexible...the most flexible solution is to create non-unique indexes.
The most flexibile solution is to create non-unique indexes?? Solution for what? Create the appropriate index for the column, or let Oracle create the index it needs to support the key or constraint. A unique index is the _correct_ index for many cases.
>>That was the question in this post...not whether or not we should drop an index!
No, I read your question clearly, but it seems you were looking for something else. Your question was if you could replace a unique index with a non-unique index without invalidating objects. The answer is no, because to replace a unique index with a non-unique index requires dropping the unique index and creating a non-unique one. What am I missing?
Your question was about dropping indexes, not dropping constraints while keeping the original index.
True, but I really wanted a discussion about flexibility. Sorry if I didn't word it clearly. In any event, I found my answer and you did technically answer the question, but it wasn't exactly what I was looking for.
This is my mistake for not wording the question correctly. If you like, we can ask the moderator to delete the question?
Thanks!
Business Accounts
Answer for Membership
by: markgeerPosted on 2009-11-02 at 11:02:34ID: 25722474
Dropping or adding an index and/or a constraint does not invalidate views or PL\SQL objects. If this primary key is referenced as a foreign key in one or more child tables though, you will need to disable them before you can drop the primary key. Also, you cannot change an index from unique to non-unique. You will need to drop the unique index, then create a non-unique one instead if you want that. I'm not sure if you will be able to re-enable foreign keys though pointing to a non-unique index or not.