- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Can we ALTER INDEX to have UNIQUE?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2007 01:07 PM
тАО06-11-2007 01:07 PM
ALTER INDEX IS_ALONE UNIQUE.
I want alter a index to have the UNIQUE instead of NONUNIQUE, is there a way without create or just drop/create? This might be a dumb question but I have to know.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2007 06:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 08:22 AM
тАО06-12-2007 08:22 AM
Re: Can we ALTER INDEX to have UNIQUE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 08:24 AM
тАО06-12-2007 08:24 AM
Re: Can we ALTER INDEX to have UNIQUE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2007 11:08 PM
тАО06-12-2007 11:08 PM
Re: Can we ALTER INDEX to have UNIQUE?
The answer is no, you cannot alter an index from non-unique to unique at least until 9i. Since you are on 10G R2 you can always try it. ;) But the most important consideration is that you must have unique values in the unique index column(s) to be able to create it!
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-13-2007 05:20 AM
тАО06-13-2007 05:20 AM
Re: Can we ALTER INDEX to have UNIQUE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2007 05:26 AM
тАО06-18-2007 05:26 AM
Re: Can we ALTER INDEX to have UNIQUE?
adding a PK constraint will create an internal index SYS.... that will do the job, so from terms of space used, you will have the same result as if a second index is created.
If application is up and runnning while you do this, the index should stay in place for performance reasons.
Go by
alter index is_alone rename to is_alone_to_be_dropped;
create unique index is_alone on ..... parallel 8;
-- check result, in case duplicate keys are present
alter index is_alone noparallel;
drop index is_alone_to_be_dropped;
You'll need the space for the second index at least temporaryly.
Volker