dbTalk Databases Forums  

replication and primary key

comp.databases.oracle comp.databases.oracle


Discuss replication and primary key in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
steve
 
Posts: n/a

Default replication and primary key - 01-01-2005 , 04:27 AM






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).



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

or do i have to
suspend replication
drop primary key constraint
enable new key col
regenerate replication support
re-enable replication.


I would ask tom, but getting a question to that guy is impossible these days.

steve






Reply With Quote
  #2  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: replication and primary key - 01-01-2005 , 07:50 AM






steve wrote:
Quote:
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

Quote:
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.
Quote:
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


Reply With Quote
  #3  
Old   
steve
 
Posts: n/a

Default Re: replication and primary key - 01-08-2005 , 03:55 PM



On Sat, 1 Jan 2005 21:50:37 +0800, Frank van Bortel wrote
(in article <cr69q3$u0t$1 (AT) news1 (DOT) zwoll1.ov.home.nl>):

Quote:
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.


oracle is currently 9.0.2.6.
I also have a registered 10g, but have not upgraded to it yet.

You say replication is dead?, what options are available in 10g

steve








Reply With Quote
  #4  
Old   
DA Morgan
 
Posts: n/a

Default Re: replication and primary key - 01-08-2005 , 09:35 PM



steve wrote:
Quote:
On Sat, 1 Jan 2005 21:50:37 +0800, Frank van Bortel wrote
(in article <cr69q3$u0t$1 (AT) news1 (DOT) 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.




oracle is currently 9.0.2.6.
I also have a registered 10g, but have not upgraded to it yet.

You say replication is dead?, what options are available in 10g

steve
Streams
DataGuard

--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.