all groups > sql server replication > november 2005 >
You're in the

sql server replication

group:

Snapshot Replication with Identity


Snapshot Replication with Identity M
11/30/2005 11:03:26 AM
sql server replication:

I create the subscription table manually using the IDENTITY property and the
NOT FOR REPLICATION option.
I set the 'name conflicts article' property to 'keep the existing table
unchanged' (Actually they are blank tables no any records in the tables).

The question is after data are transfer to the subscriber. When one want
insert a record to the table in the subscriber. It show error message
something like cannot insert a duplicate key. SQL Server do not use next
incremental identity value for IDENTITY column.
I can around this problem by changing Identity from 'Yes (Not For
Replication)' to 'No' Or 'Yes' in design table window and save setting, Then
set it back to 'Yes (Not For Replication)' and save setting.

But Why the next incremental identity value is not used for the column has
an IDENTITY property before the changing.


Re: Snapshot Replication with Identity M
11/30/2005 1:51:27 PM

The question is happen after successfully transfer data from publication to
subscriber.
Then we want use the resulting database (On subscriber)

When we try to use the subscriber database, The user need insert records to
database sometimes.


[quoted text, click to view]


Re: Snapshot Replication with Identity Paul Ibison
11/30/2005 7:47:20 PM
I'm not too sure why inserts are occurring on the subscriber.
Have you set up immediate updating subscribers or queued updating
subscribers? (If not then the subscriber data is essentially treated as
read-only).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Re: Snapshot Replication with Identity Paul Ibison
12/1/2005 12:00:00 AM
In that case you'll need to set up an updating subscribers topology. If the
publisher also changes records then I suggest using transactional
replication with immediate updating subscribers. If the subscriber is
sometimes offline, then queued updating subscribers is the one. Either way,
you won't have issues with identity columns.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)






AddThis Social Bookmark Button