Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ** anyway to create a primary key on table with duplicates that cannot be deleted
Why wasn't a PK defined on the table when you initially added the table to
replication ? Presumably you set the columns to use an underlying
non-unique index which implies that the app is designed to allow duplicate
values in that table. Are you experiencing deferrors due to the duplicates
?
Don't forget that any DDL on the table will require you to generate rep support.
Talat.
Internet
terrysutton_at_usa.net_at_freelists.org - 20/10/2005 00:16
Please respond to terrysutton_at_usa.net
Sent by: oracle-l-bounce_at_freelists.org
To: oracle-l
cc:
Subject: Re: ** anyway to create a primary key on table with duplicates
that cannot be deleted
A,
I may be missing what the issue is, but assuming you mean Multi-Master Replication, here's what I would do.
In a session on each database
1. exec dbms_reputil.replication_off
2. Delete the duplicates using any one of the many queries people use to do
this (you may want to create a non-unique index on what should be the
primary key column before you do this)
3. Create the primary key (after dropping the non-unique index)
4. exec dbms_reputil.replication_on
--Terry
I have a table under replication and corrupted with duplicates. I cannot do any update/delete operation on the table since it needs a primary key. I cannot create a primary key since duplicates exist. catch..
This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified.
BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom.
BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom.
BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Oct 20 2005 - 03:49:45 CDT
- text/html attachment: C.htm
![]() |
![]() |