Groups | Blog | Home
all groups > sql server replication > march 2006 >

sql server replication : Transactional Replication Implementation


Paul Ibison
3/27/2006 12:00:00 AM
Sangra,
the PK is mandatory. You could add a not-nullable column with a default of
newid() and use that as the PK.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Sangra
3/27/2006 4:56:02 AM
Hi,

I'm new to SQL*Server and implementing Transactional Replication.
The active production database is in Sql Server 6 to be upgraded to Sql
Server 2000 @ Windows 2003 with Transactional Replication feature.

The plan is to build a new server, create the database using scripts from
the production, create all the objects (tables, indexes etc) using scripts
from the production, insert data using import/export from prodcution, then
implement 'Transactional Replication' and perform testing.

I've got a problem while implementing replication: some of the tables in the
production environment dont have Primary key columns and I suppose
Transactional Replication is not possible without all tables having primary
key.

To get around this, I added a dummy column to the target tables(tables
without primary keys) with IDENTITY feeature and marked them as a primary
key. But came across another problem that some tables already having identity
column and that too with some repeated values in them!!! So I can neither add
another Identity column nor mark them as primary key.

Please suggest or show me alternate way around.
- Is it possible to implement Transactional Replication with some table
without primary keys?
- How can I add a primary key column to the existing tables without
suffering the application & codes?
- Is there anything like auto updateable primary key column that wont ask
the application forit's corresponding values?

The objective is to come out of this constraint of primary key and implement
the Replication successfully.

Thanks & Regards
AddThis Social Bookmark Button