Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I wish I knew about this site years ago. It would have saved me a lot of heartaches..."

Geography

Where in the world do Tek-Tips members come from?
SaintJames (Programmer)
14 Jun 05 15:49
How do I add a composite primary key to a contraints. in Oracle 10

This isthe SQL that I have but it returns an error,

SQL=ALTER TABLE [Table_Name] ADD CONSTRAINT [Constraint_Name] PRIMARY KEY (field1, field2);

Then I get this error:ORA-00955: name is already used by an existing object

But the contraint is non-existant. If I add only one field the constraint get added.

Help!
Oracle Newby

oradba101 (MIS)
14 Jun 05 17:12
Hi, Saint James

   It may mean that you have an index that uses both those columns.

Regards,

William Chadbourne
Oracle DBA

sem (Programmer)
15 Jun 05 1:18
I think that existing index can not raise such error as it would be picked up by constraint without the need in new one. I suppose that you should check your existing constraints  more carefully.

Regards, Dima
http://seminihin.narod.ru

SantaMufasa (TechnicalUser)
15 Jun 05 1:36
It seems to me that an index already exists by the same name as "[Constraint_Name]". Whatever "[Constraint_Name]" is, look for an index by that name in the result set of the query:

CODE

select index_name from user_indexes;
Let us know your findings.

Mufasa
 (aka Dave of Sandy, Utah, USA)
 www.dasages.com

 Do you use Oracle and live or work in Utah, USA?
 Then click here to join Utah Oracle Users Group on Tek-Tips.

SaintJames (Programmer)
15 Jun 05 8:59
I've removed the selected constraints for the indexes now I get

ORA-01536: space quota exceeded for tablespace
SantaMufasa (TechnicalUser)
15 Jun 05 13:10
This means that instead of "quota unlimited" for the target tablespace, your DBA has assigned you some explicit, finite value for space consumption on the target tablespace. To move beyond this problem, either your DBA must alter your quota for that tablespace to some higher value (or "quota unlimited") for the target tablespace, or you must DROP some obsolete/extraneous table or index or TRUNCATE some table to the extent that you have enough free quota to accommodate the creation of the new index.

Mufasa
 (aka Dave of Sandy, Utah, USA)
 www.dasages.com

 Do you use Oracle and live or work in Utah, USA?
 Then click here to join Utah Oracle Users Group on Tek-Tips.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close