all groups > sql server replication > july 2007 >
You're in the

sql server replication

group:

replication and the identity column


replication and the identity column Jason
7/10/2007 2:58:04 PM
sql server replication:
I have been dealing with transactional replication a little bit and I am a
bit confused with the identity column and its affect on replication.

It seems like SS doesn't want to replicate the identity the subscriber. The
Dialogue box directed me to set the property to "not for replication", when I
did that the identify is blank in the subscriber db.

If I want to use the subscriber DB as a DR database, and the app needs the
identity column to be the same, isn't there a way around this limitation.

can someone point me to a resource that explains this concept?


Re: replication and the identity column Hilary Cotter
7/11/2007 12:00:00 AM
I normally use bi-directional transactional replication with odd values on
one side and even on the other. IE an odd seed on the publisher , and an
even on the subscriber. Set the increment to 2.

Put the schema in place on the subscriber and put the data there. Then do a
nosync and ensure that the identities are the correct values.

Use DBCC checkident to verify that the next assigned value on the Publisher
is odd and even on the subscriber.

While you can use queued updating for this, queued is designed for
situations where the majority of your dml occurs on your publisher not your
subscriber and it uses triggers to track changes occurring on the
subscriber. This will add latency to every DML occurring on the subscriber.

--
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

RE: replication and the identity column Paul Ibison
7/11/2007 1:54:02 AM
The simplest solution is to set up the subscriber as a queued updating
subscriber, and allocate a large range for the identity ranges. This will
ensure the identity column is retained, as well as retaining the PKs.
HTH,
Paul Ibison
RE: replication and the identity column changliw NO[at]SPAM online.microsoft.com
7/11/2007 7:22:04 AM
Hi,
I understand that you would like to replicate the identity column to your
subscriber, however the process failed. You would like to know why.
If I have misunderstood, please let me know.

This is a known by design limitation. Please refer to this article:
Managing Identity Values
http://msdn2.microsoft.com/en-us/library/aa237098(SQL.80).aspx

You may perform a test to check if the third method using other columns as
primary keys helps. If it could not fit your requirement, I am afraid that
you may consider to use an application to implement the replication by
yourself.

Please feel free to let me know if you have any other questions or
concerns.

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications

If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.


Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================



RE: replication and the identity column Jason
7/11/2007 10:04:02 AM
thanks, so this is someting that would be set up when creating the subsciber?
i don't see this option anywhere on my test replication scenario i have
running.

[quoted text, click to view]
Re: replication and the identity column Jason
7/11/2007 10:06:03 AM
thanks for the reply. in this scenario would the identity values be the same
on the subscriber side then? doesn't read that way.

[quoted text, click to view]
Re: replication and the identity column Paul Ibison
7/11/2007 6:53:22 PM
Hi Jason,
the publication needs setting up to allow queued updating subscribers by
using the advanced options on the first screen of the wizard.
Likewise the subscriber is set up.
HTH,
Paul Ibison

Re: replication and the identity column Hilary Cotter
7/12/2007 12:00:00 AM
They would be the same. Rows entered on the publisher will be odd, rows
entered on the subscriber will be even.

--
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

Re: replication and the identity column changliw NO[at]SPAM online.microsoft.com
7/17/2007 12:00:00 AM
Hi Jason,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
I will be more than happy to be of assistance.

Charles Wang
Microsoft Online Community Support

======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
AddThis Social Bookmark Button