Re: replication and primary key

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Sat, 01 Jan 2005 14:50:37 +0100
Message-ID: <cr69q3$u0t$1_at_news1.zwoll1.ov.home.nl>


steve wrote:
> Hi,
>
> several years ago , I implemented the oracle replication system.
>
> At that time our database was ported from an old Fox pro application. ( K ,
> no laughing at the back).
>
"Nothing runs like a fox"
Still have an unlimited set here, for old times sake :)

>
> As the foxpro did not use "primary keys", I set up a replication column
> called "repindex".
>
> Each site that adds records uses:
>
> "siteID+sequencekey", this col, is col is only used fro replication, but I
> now have the situation that the primary key is allocated to this col.
>
> As I'm now re-implementing in applications in java,
> I now want to allocate the primary key to another distinct column:
>
> 1. can i just drop the primary key then enable the key on another col
> 2. can the replication system still use the "repindex" col, without it being
> the primary key col

What version Oracle?
The recommendation is to use primary keys for replication, rowid is still supported for backward compatibility purposes.

(Advanced) Replication is pronounced dead by Oracle, BTW.
>
> or do i have to
> suspend replication
> drop primary key constraint
> enable new key col
> regenerate replication support
> re-enable replication.
>
You would, as soon as you change columns for replication identification.

As it looks like a rebuild to start with, I'd look for other options than Advanced Replication; 10g has other options, which -in absence of version information- may or may not be applicable to your situation.
If you want to stick to (Adv.) Replication, I'd rework your design with primary keys.

-- 
Regards,
Frank van Bortel
Received on Sat Jan 01 2005 - 14:50:37 CET

Original text of this message