473,700 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

replication and primary key

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+sequenc ekey", 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

Jul 19 '05 #1
3 5445
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+sequenc ekey", 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
Jul 19 '05 #2
On Sat, 1 Jan 2005 21:50:37 +0800, Frank van Bortel wrote
(in article <cr**********@n ews1.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+sequenc ekey", 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


Jul 19 '05 #3
steve wrote:
On Sat, 1 Jan 2005 21:50:37 +0800, Frank van Bortel wrote
(in article <cr**********@n ews1.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+sequ encekey", 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
identificatio n.

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
da******@x.wash ington.edu
(replace 'x' with 'u' to respond)
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1384
by: Boris Villazon | last post by:
Hi First at all ... sorry for my poor english. I have the following process: I have a Primary PC that acquires data from an external device. This data is stored in a local database. This external device is sending information all the time. There is a Secondary PC that copies the data from the Primary PC database. There is another database in the secondary pc. I have to do this with longer time intervals.
0
2041
by: Philip Trim | last post by:
General Brief: 3 SQL Servers as MS SQL Server 2000 Standard Edition with Service Pack 3 All using FTP for snapshots All Servers are both Publishers and Distributors. Server A has the correct data needed to be replicated to Server B and C. Server B and C and have blank data. Server B and C are blank databases ready for replication. Server A publishers to Server B and Server C
2
1595
by: Ian Wyld | last post by:
Hello All We intend to replicate a database in order to have it as a near immediate standby in case of the failure of the main server. Is this the best solution for disaster recovery? We are currently testing our replication plan. When we set up the subscriber, a snapshot of the publisher is created and this takes hours. Is there a better way?
12
1870
by: debian mojo | last post by:
Hello Group, I'm working on two SQL server databases on two different remote servers. What client needs is that his database on one remote server should be mirrored to the other one. The changed should be propogated at regular intervals at the other server. For now i'm quite sure that i'll have to use replication to resolve this issue. But which type of replication should i use? Transactional, Merge or
4
1487
by: SQLNow | last post by:
If I have two tables that I want to synchronize via replication publish subscriber model and they don't contain primary keys i.e. an ID field, but there are three columns that make a unique key. The tables are HUGE so I want to minimize down time. Can replication still be done, either snapshot, transactional, or merge? Again I don't want to create any more columns in the tables because of the record volume. Thanks
3
1392
by: subaruwrx88011 | last post by:
Hello, I am very new to MySQL and just got done reading the replication chapter in my reference manual. I kinda understand but I still don't know if my scenario is going to work out. Here is my scenario. I have 2 servers, A and B. A is the primary server and master in mysql. B is the redundant server and the slave in mysql. A is replicating to B. Now A fails and B becomes the primary server (still slave in mysql?). A finally comes...
2
2058
by: DickChristoph | last post by:
Hi I tried posting this query in microsoft.public.sqlserver.programming but got no response. I am new to replication but I am trying to setup up a transactional replication of tables from one database to another in MSSQL 2000 (SP2). My target tables have primary keys defined. Under publication properties I go to the snapshot tab and for each table I clear the check box that says
1
2812
by: tropicana | last post by:
Hi, I am setting up transactional replication and have run into a problem… Can anyone help? The table I am publishing is called Area. The table, Area, is the same on both the publisher and the subscriber. When executing transactional replication, the error I get from the distribution agent is:- Cannot update identity column 'AreaId'.
3
601
by: steve | last post by:
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
0
8648
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9218
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8929
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3095
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2031
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.