Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ** anyway to create a primary key on table with duplicates that cannot be deleted

Re: ** anyway to create a primary key on table with duplicates that cannot be deleted

From: Terry Sutton <terrysutton_at_usa.net>
Date: Wed, 19 Oct 2005 16:16:04 -0700
Message-ID: <062c01c5d503$c9f8a160$61f5a8c0@TerrySutton>


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..
  i tried creating index by appending rowid/rownum but no luck. Any way out of this. Cannot remove the table from replication since that needs quiescing and cannot quiese right now due to processing that will last another 4 days. Thanks for help.

--

http://www.freelists.org/webpage/oracle-l Received on Wed Oct 19 2005 - 18:23:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US