We are facing a issue with merge replication.
Suppose I have a table customer (cid,cname) which we have published.
Note cid is primary key and it is not identity.
Initially there is one row in customer table (1,'Mohan')
After replication process
At publisher: one row is inserted with cid=2
At subscriber: one row is inserted with cid=2(allowed as working on its own
copy)
When we syncronize it throws an error as there are 2 rows with cid=2.
Note : we cannot set cid as identity.
Can anyone tell me how this issue is to be resolved.
Thanks
saandii777
One of the solution I saw on internet is to add a column to table customer
having name of subscriber/publisher.
Thus defining cid and this column as primary key.
I know it will solve the purpose but I guess I am not in this position to
have table structure changed like this.
Someone plz help
saandii777
Rather than pick one thing that you can't change, why not include details of
your system (SQL Server versions for instance) and what you can change? That
would make it easier for someone to suggest possible ideas.
Can you change the application? For instance, have the publisher use only
odd numbers, and the subscriber only use even numbers? Or use different
seeds for your id numbers, say starting at 1 for the publisher and 10000 for
the subscriber (which of course breaks when you hit 10000 ids inserted by
the publisher, but you haven't provided any information about the expected
numbers of rows inserted so I've just picked that arbitrarily, you would
need to select a value that would allow your system to scale as required).
If you search Google for articles about SQL Server merge replication
conflicts you'll find lots of information on what you could do.
Dan
"saandii777" <saand...@discussions.microsoft.com> wrote in message
news:065F9DB1-85BA-43C5...@microsoft.com...
The information is very much helpful.
I can surely resolve this when primary key column is set to identity.
But in my case some of the tables cannot have primary key column set to
identity and I am really looking for a approach where this can still be
solved.
Note:
Publisher location: SQL SERVER 2008
Subscriber location: SQL SERVER COMPACT EDITION
thanks
saandii777
"Dan" wrote:
> .
>
Dan
"saandii777" <saand...@discussions.microsoft.com> wrote in message
news:E4CBB797-6146-4CF8...@microsoft.com...
With current value we know the position to insert and always with min and max
we know publisher/subscriber is inserting within the permisible range else
we update the range and then allow insert.
Thanks for the suggestion.
saandii777
"Dan" wrote:
> .
>