Skip to Main Content

Oracle Database Discussions

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!

insert hit ora-00001 unique constraint violated on a constraint with three columns

877440Jan 15 2015 — edited Jan 16 2015

Hi, All

Here are our db information:

Db version: 11gr2

the table called device has a unique constraint:

ALTER TABLE scott.device ADD (

  CONSTRAINT DEV_ck

  CHECK (SERVICE_CD IN ('C','D','T')),

  CONSTRAINT device_ID_PK

  PRIMARY KEY

  (device_ID)

  USING INDEX scott.device_ID_PK,

  CONSTRAINT DEVICE_UNIQUE

  UNIQUE (DEVICE_ID, TAG, SERVICE_CD)

  USING INDEX scott.DEVICE_ID_UNIQUE);

Now whenever an insert happens, ora-00001 unique constraint violated.

I checked the table counts on both source and target, source has less records than on the target.

I would like to find out those duplicats. But not sure how to do that on a unique constraints on three columns.

Please help

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2015
Added on Jan 15 2015
12 comments
2,719 views