Showing posts with label conflict. Show all posts
Showing posts with label conflict. Show all posts

Friday, March 30, 2012

Merge seems to hang at conflict and conflict is not logged

We have a SQL2005 merge replication database with 8 subscribers. Three of the
subscribers have not successfully replicated. We would appreciate any
additional ideas for correcting this. So far we have some inconsistencies.
For example, the "View Synchronization Status" displays:
"Downloaded 100 change(s) in 'OurTable' (100 updates, 1 conflict)"
and the publisher's "Microsoft Replication Conflict Viewer" displays:
"There are no conflicts to view."
If you have any ideas why conflicts are causing the replication to fail
while the conflict viewer shows no conflicts, we would appreciate your input.
Thanx.
Were there any conflicts on the subscriber side?
You can run the conflict viewer there as well, or if that's not
convenient/possible there are sp_xxx procedures to help you view the
conflict tables on the client...

Merge replicaton: How to customize conflict detection, resolution?

We have a simple problem:
We have a table Assets[asset_id, title] and a table
Asset_Versions[asset_id, version_no]. In addition, there are columns
added by replication for storing the ROWGUID.
After synchronzation, assume both Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)
Before syncing again a new version is added at both nodes so that both
Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)(1,2)
Now when it syncs again, the publisher will make another entry of
Assets_Versions(1,2) in the subscriber thus disturbing the business
logic because the Subscriber will now have 2 entries for version_no=2.
How can we make Replication identify this as a conflict. Can we write
a conflict resolver for such a situation?
Thanks and regards,
YashWhat is the PK on Assets_Versions? I think if it includes the id and version
,
then this will get identified as a conflict.
HTH,
Paul Ibison|||Actually I can't test it here but I believe I was incorrect earlier and that
you'll just get an error instead - perhaps you can test this for me. What I'
m
thinking of now is that you could just have id and version in the
asset_versions table and update rather than add new versions:
ID, version, guid
1,1,xxx
on next version we have:
ID, version, guid
1,2,xxx
If this fits in with your application it'll work as this will cause a
conflict if done on 2 nodes before syncing.
HTH,
Paul Ibison

Merge replicaton: How to customize conflict detection, resolution?

We have a simple problem:
We have a table Assets[asset_id, title] and a table
Asset_Versions[asset_id, version_no]. In addition, there are columns
added by replication for storing the ROWGUID.
After synchronzation, assume both Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)
Before syncing again a new version is added at both nodes so that both
Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)(1,2)
Now when it syncs again, the publisher will make another entry of
Assets_Versions(1,2) in the subscriber thus disturbing the business
logic because the Subscriber will now have 2 entries for version_no=2.
How can we make Replication identify this as a conflict. Can we write
a conflict resolver for such a situation?
Thanks and regards,
Yash
What is the PK on Assets_Versions? I think if it includes the id and version,
then this will get identified as a conflict.
HTH,
Paul Ibison
|||Actually I can't test it here but I believe I was incorrect earlier and that
you'll just get an error instead - perhaps you can test this for me. What I'm
thinking of now is that you could just have id and version in the
asset_versions table and update rather than add new versions:
ID, version, guid
1,1,xxx
on next version we have:
ID, version, guid
1,2,xxx
If this fits in with your application it'll work as this will cause a
conflict if done on 2 nodes before syncing.
HTH,
Paul Ibison

Merge replicaton: How to customize conflict detection, resolution?

We have a simple problem:
We have a table Assets[asset_id, title] and a table
Asset_Versions[asset_id, version_no]. In addition, there are columns
added by replication for storing the ROWGUID.
After synchronzation, assume both Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)
Before syncing again a new version is added at both nodes so that both
Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)(1,2)
Now when it syncs again, the publisher will make another entry of
Assets_Versions(1,2) in the subscriber thus disturbing the business
logic because the Subscriber will now have 2 entries for version_no=2.
How can we make Replication identify this as a conflict. Can we write
a conflict resolver for such a situation?
Thanks and regards,
Yash
What is the PK on Assets_Versions? I think if it includes the id and version,
then this will get identified as a conflict.
HTH,
Paul Ibison
|||Actually I can't test it here but I believe I was incorrect earlier and that
you'll just get an error instead - perhaps you can test this for me. What I'm
thinking of now is that you could just have id and version in the
asset_versions table and update rather than add new versions:
ID, version, guid
1,1,xxx
on next version we have:
ID, version, guid
1,2,xxx
If this fits in with your application it'll work as this will cause a
conflict if done on 2 nodes before syncing.
HTH,
Paul Ibison

Merge replicaton: How to customize conflict detection, resolution?

We have a simple problem:
We have a table Assets[asset_id, title] and a table
Asset_Versions[asset_id, version_no]. In addition, there are columns
added by replication for storing the ROWGUID.
After synchronzation, assume both Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)
Before syncing again a new version is added at both nodes so that both
Node1 and Node2 have
Assets(1,'XYZ') and Assets_Versions(1,1)(1,2)
Now when it syncs again, the publisher will make another entry of
Assets_Versions(1,2) in the subscriber thus disturbing the business
logic because the Subscriber will now have 2 entries for version_no=2.
How can we make Replication identify this as a conflict. Can we write
a conflict resolver for such a situation?
Thanks and regards,
YashWhat is the PK on Assets_Versions? I think if it includes the id and version,
then this will get identified as a conflict.
HTH,
Paul Ibison|||Actually I can't test it here but I believe I was incorrect earlier and that
you'll just get an error instead - perhaps you can test this for me. What I'm
thinking of now is that you could just have id and version in the
asset_versions table and update rather than add new versions:
ID, version, guid
1,1,xxx
on next version we have:
ID, version, guid
1,2,xxx
If this fits in with your application it'll work as this will cause a
conflict if done on 2 nodes before syncing.
HTH,
Paul Ibison|||A primary key or unique index on Assets_Versions should prevent such a
double insert/
--
relevantNoise - dedicated to mining blogs for business intelligence.
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
<yashgt@.gmail.com> wrote in message
news:1187325787.241826.116170@.m37g2000prh.googlegroups.com...
> We have a simple problem:
> We have a table Assets[asset_id, title] and a table
> Asset_Versions[asset_id, version_no]. In addition, there are columns
> added by replication for storing the ROWGUID.
> After synchronzation, assume both Node1 and Node2 have
> Assets(1,'XYZ') and Assets_Versions(1,1)
> Before syncing again a new version is added at both nodes so that both
> Node1 and Node2 have
> Assets(1,'XYZ') and Assets_Versions(1,1)(1,2)
> Now when it syncs again, the publisher will make another entry of
> Assets_Versions(1,2) in the subscriber thus disturbing the business
> logic because the Subscriber will now have 2 entries for version_no=2.
> How can we make Replication identify this as a conflict. Can we write
> a conflict resolver for such a situation?
> Thanks and regards,
> Yash
>sql

Wednesday, March 28, 2012

merge replication, later wins conflict resolver issue

I am testing a scenario with merge replication when publisher has an entry
1st, and the same data entered into the subscriber later (but before merge
agent runs).
I am using merge replication with 'Microsoft SQL Server DATETIME (Later
Wins) Conflict Resolver'.
I inserted the same row (row with same PK) into publisher, then into
subscriber.
I am expecting to see row from subscriber replicate to publisher at the next
time merge agent runs.
Instead the row from publisher shows up in my subscriber side.
The conflict resolver reports that the publisher won:
The row was inserted at 'EZROUTESUNDB01.repltest' but could not be inserted
at 'EZROUTESTGDB01.repltest'. Violation of PRIMARY KEY constraint 'P_test1'.
Cannot insert duplicate key in object 'test1'.
The conflict table has conflict type 5, "Upload Insert Failed".
I want the latest row from subscriber to win that is why I choose "Later
Wins" resolver.
BTW, when I update the same row on both sides, repl. works like a charm,
later change will won independent of which side had it originally (so
subscriber data migrates to publisher OK if newer).
Also, when new inserts are made in either side, those are merged correctly.
Am I misunderstanding something here?
Thanks,
Zoltan
did you specify the time data type column to use as a basis for the later
wins resolver? You enter this is the Enter Information Needed by the
Resolver text box.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"rr news" <znyiri@.hotmail.com> wrote in message
news:HFXad.11969$yP2.4853@.tornado.tampabay.rr.com. ..
> I am testing a scenario with merge replication when publisher has an entry
> 1st, and the same data entered into the subscriber later (but before merge
> agent runs).
> I am using merge replication with 'Microsoft SQL Server DATETIME (Later
> Wins) Conflict Resolver'.
> I inserted the same row (row with same PK) into publisher, then into
> subscriber.
> I am expecting to see row from subscriber replicate to publisher at the
next
> time merge agent runs.
> Instead the row from publisher shows up in my subscriber side.
> The conflict resolver reports that the publisher won:
> The row was inserted at 'EZROUTESUNDB01.repltest' but could not be
inserted
> at 'EZROUTESTGDB01.repltest'. Violation of PRIMARY KEY constraint
'P_test1'.
> Cannot insert duplicate key in object 'test1'.
> The conflict table has conflict type 5, "Upload Insert Failed".
> I want the latest row from subscriber to win that is why I choose "Later
> Wins" resolver.
> BTW, when I update the same row on both sides, repl. works like a charm,
> later change will won independent of which side had it originally (so
> subscriber data migrates to publisher OK if newer).
> Also, when new inserts are made in either side, those are merged
correctly.
> Am I misunderstanding something here?
> Thanks,
> Zoltan
>
|||Hilary,
Thanks for you fast response.
Here are the table definition, the article info, and my test scenarios.
I am only having problem with scenario 3.
Thanks,
Zoltan
CREATE TABLE [test1] (
[num] [int] NOT NULL ,
[date] [datetime] NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT
[DF__test1__rowguid__353DDB1D] DEFAULT (newid()),
[strcol] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
CONSTRAINT [P_test1] PRIMARY KEY CLUSTERED
(
[num]
) ON [PRIMARY]
) ON [PRIMARY]
GO
sp_helpmergearticle @.article='test1'
id name
source_owner source_object
sync_object_owner sync_object
description status
creation_script conflict_table
article_resolver
subset_filterclause
pre_creation_command schema_option type column_tracking resolver_info
vertical_partition destination_owner
identity_support pub_identity_range identity_range threshold
verify_resolver_signature destination_object
allow_interactive_resolver fast_multicol_updateproc check_permissions
-- ---- --
---- --
--- --
-- ---
-- ---- --
-- ---- --
---- --
-- ---
-- -- -- -- --
-- ---- --
-- ---- --
-- -- -- -- --
-- ----
-- -- -- --
1 test1 dbo
test1 dbo
test1 NULL
2 NULL
conflict_repltest_test1 Microsoft SQL
Server DATETIME (Later Wins) Conflict Resolver NULL
1 0x000000000000CFF1 10 1 date
1 dbo
0 NULL NULL NULL 0
test1 0
1 0
I have a datetime type column named "date" which is entered in the
resolver_info field for article 'test1'.
article_resolver is configured for 'Microsoft SQL Server DATETIME (Later
Wins) Conflict Resolver'
Test scenarios:
1) new (row w/diff PK) inserted into either side, each row replicated
(merged to other side), OK
2) same row updated with different data, then the latest entry wins no
matter if it was created on the publisher side or the subscriber side
3) the only problem I have is when same row (row w/same PK) entered into
both sides.
EZROUTESTGDB01 publisher
EZROUTESUNDB01 sunscriber
--> 2nd scenario, later wins resolver works fine.
-- testing update same row, 1st at subscriber, then publisher
-- insert test row
insert into EZROUTESTGDB01.repltest.dbo.test1 (num, date, strcol) values(
102, getdate(), 'XXX' )
-- wait until it synchs, so both sides have same row
update EZROUTESTGDB01.repltest.dbo.test1 set date=getdate(), strcol='publ'
where num=102
-- wait few seconds
update EZROUTESUNDB01.repltest.dbo.test1 set date=getdate(), strcol='subscr'
where num=102
-- wait until synch, both sides end up with 'subscr' in strcol column, OK
--> 3rd scenario, NOT OK when subscriber has the later entry, publisher
still wins...?!
--clean up, wait until synch
delete from repltest.dbo.test1 where num > 20
-- testing insert same PK into publisher 1st, then subscriber, still
publisher wins, NOT OK!
insert into EZROUTESTGDB01.repltest.dbo.test1(num, date, strcol) values(
101, getdate(),'publisher' )
-- wait few seconds
insert into EZROUTESUNDB01.repltest.dbo.test1(num, date, strcol) values(
101, getdate(),'subscriber' )
-- wait until synch, both sides end up with 'publisher' in strcol column,
NOT OK
Resolver reports:
The row was inserted at 'EZROUTESUNDB01.repltest' but could not be inserted
at 'EZROUTESTGDB01.repltest'. Violation of PRIMARY KEY constraint 'P_test1'.
Cannot insert duplicate key in object 'test1'.
BTW, clocks are synched, I checked it.
Merge agent is configured to run once/minute.
Microsoft SQL Server 2000 - 8.00.760 on both sides.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:em7nkYMsEHA.2144@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> did you specify the time data type column to use as a basis for the later
> wins resolver? You enter this is the Enter Information Needed by the
> Resolver text box.
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> "rr news" <znyiri@.hotmail.com> wrote in message
> news:HFXad.11969$yP2.4853@.tornado.tampabay.rr.com. ..
entry[vbcol=seagreen]
merge
> next
> inserted
> 'P_test1'.
> correctly.
>

Merge replication, conflict resolution question...

Hi,
I'm trying to resolve a merge replication conflict problem, and I'm not sure
how to do it, additionally to this, I imagine that this is a very common
problem, so, some expert may point me on the right direction.
I have 3 tables that needs to be replicated, 1 publisher, 10 anonymous
subscribers that do a 'pull' and each subscriber synchronize automatically
once a day, a requirement is that all conflicts must be resolved without
human intervention.
These are the structures of the tables I'm using :
CREATE TABLE [dbo].[States] (
[Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
[Name] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[Cities] (
[Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
[Name] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[StateId] [uniqueidentifier] NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[Properties] (
[Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
[PublicationDate] [datetime] NOT NULL ,
[Address] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[CityId] [uniqueidentifier] NOT NULL ,
[Price] [money] NOT NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[States] WITH NOCHECK ADD
CONSTRAINT [PK_States] PRIMARY KEY CLUSTERED
(
[Id]
) ON [PRIMARY]
ALTER TABLE [dbo].[Cities] WITH NOCHECK ADD
CONSTRAINT [PK_Cities] PRIMARY KEY CLUSTERED
(
[Id]
) ON [PRIMARY]
ALTER TABLE [dbo].[Properties] WITH NOCHECK ADD
CONSTRAINT [PK_Properties] PRIMARY KEY CLUSTERED
(
[Id]
) ON [PRIMARY]
ALTER TABLE [dbo].[States] ADD
CONSTRAINT [DF_States_Id] DEFAULT (newid()) FOR [Id],
CONSTRAINT [IX_States] UNIQUE NONCLUSTERED
(
[Name]
) ON [PRIMARY]
ALTER TABLE [dbo].[Cities] ADD
CONSTRAINT [DF_Cities_Id] DEFAULT (newid()) FOR [Id],
CONSTRAINT [IX_Cities] UNIQUE NONCLUSTERED
(
[Name]
) ON [PRIMARY]
ALTER TABLE [dbo].[Properties] ADD
CONSTRAINT [DF_Properties_Id] DEFAULT (newid()) FOR [Id]
ALTER TABLE [dbo].[Cities] ADD
CONSTRAINT [FK_Cities_States] FOREIGN KEY
(
[StateId]
) REFERENCES [dbo].[States] (
[Id]
)
ALTER TABLE [dbo].[Properties] ADD
CONSTRAINT [FK_Properties_Cities] FOREIGN KEY
(
[CityId]
) REFERENCES [dbo].[Cities] (
[Id]
)
Ok. the three tables needs to be merged and I want to resolve this problem :
Subscriber1 enter this data :
State [1, 'state1']
City [1, 'city1', 1]
Subscriber2 enter this data :
State [2, 'state1']
City [2, 'city2', 2]
Now subscriber1 synchronize and then subscriber2, and the data on the
publisher is :
State [1, 'state1']
City [1, 'city1', 1]
(the second state1 cant be inserted because of the unique contraint on the
name and the city2 cant be inserted because the fk does not exists)
(this is with the default resolver)
And I want this to be resolved as :
State [1, 'state1']
City [1, 'city1', 1]
City [2, 'city2', 1]
So, the questions are :
Can this be resolved with a custom stored procedure resolver ?
It seems that I need to run an stored procedure on the publisher just after
a subscriber upload his data, so the modified keys are properly changed at
the subscriber when the data back to him... obiously, for this to work I
need to remove the name's unique constraints, and handle this uniqueness
manually... can this solution be applied ?
I would really apressiate some help, thanks.
Paul.
Please any advice ?
"-ND-" <ndeath@.gmx.net> wrote in message
news:%23WwDRSvxEHA.1168@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'm trying to resolve a merge replication conflict problem, and I'm not
sure
> how to do it, additionally to this, I imagine that this is a very common
> problem, so, some expert may point me on the right direction.
> I have 3 tables that needs to be replicated, 1 publisher, 10 anonymous
> subscribers that do a 'pull' and each subscriber synchronize automatically
> once a day, a requirement is that all conflicts must be resolved without
> human intervention.
> These are the structures of the tables I'm using :
> CREATE TABLE [dbo].[States] (
> [Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
> [Name] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> ) ON [PRIMARY]
> CREATE TABLE [dbo].[Cities] (
> [Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
> [Name] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
> [StateId] [uniqueidentifier] NOT NULL
> ) ON [PRIMARY]
> CREATE TABLE [dbo].[Properties] (
> [Id] uniqueidentifier ROWGUIDCOL NOT NULL ,
> [PublicationDate] [datetime] NOT NULL ,
> [Address] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
,
> [CityId] [uniqueidentifier] NOT NULL ,
> [Price] [money] NOT NULL
> ) ON [PRIMARY]
> ALTER TABLE [dbo].[States] WITH NOCHECK ADD
> CONSTRAINT [PK_States] PRIMARY KEY CLUSTERED
> (
> [Id]
> ) ON [PRIMARY]
> ALTER TABLE [dbo].[Cities] WITH NOCHECK ADD
> CONSTRAINT [PK_Cities] PRIMARY KEY CLUSTERED
> (
> [Id]
> ) ON [PRIMARY]
> ALTER TABLE [dbo].[Properties] WITH NOCHECK ADD
> CONSTRAINT [PK_Properties] PRIMARY KEY CLUSTERED
> (
> [Id]
> ) ON [PRIMARY]
> ALTER TABLE [dbo].[States] ADD
> CONSTRAINT [DF_States_Id] DEFAULT (newid()) FOR [Id],
> CONSTRAINT [IX_States] UNIQUE NONCLUSTERED
> (
> [Name]
> ) ON [PRIMARY]
> ALTER TABLE [dbo].[Cities] ADD
> CONSTRAINT [DF_Cities_Id] DEFAULT (newid()) FOR [Id],
> CONSTRAINT [IX_Cities] UNIQUE NONCLUSTERED
> (
> [Name]
> ) ON [PRIMARY]
> ALTER TABLE [dbo].[Properties] ADD
> CONSTRAINT [DF_Properties_Id] DEFAULT (newid()) FOR [Id]
> ALTER TABLE [dbo].[Cities] ADD
> CONSTRAINT [FK_Cities_States] FOREIGN KEY
> (
> [StateId]
> ) REFERENCES [dbo].[States] (
> [Id]
> )
> ALTER TABLE [dbo].[Properties] ADD
> CONSTRAINT [FK_Properties_Cities] FOREIGN KEY
> (
> [CityId]
> ) REFERENCES [dbo].[Cities] (
> [Id]
> )
>
> Ok. the three tables needs to be merged and I want to resolve this problem
:
> Subscriber1 enter this data :
> State [1, 'state1']
> City [1, 'city1', 1]
> Subscriber2 enter this data :
> State [2, 'state1']
> City [2, 'city2', 2]
> Now subscriber1 synchronize and then subscriber2, and the data on the
> publisher is :
> State [1, 'state1']
> City [1, 'city1', 1]
> (the second state1 cant be inserted because of the unique contraint on the
> name and the city2 cant be inserted because the fk does not exists)
> (this is with the default resolver)
> And I want this to be resolved as :
> State [1, 'state1']
> City [1, 'city1', 1]
> City [2, 'city2', 1]
> So, the questions are :
> Can this be resolved with a custom stored procedure resolver ?
> It seems that I need to run an stored procedure on the publisher just
after
> a subscriber upload his data, so the modified keys are properly changed at
> the subscriber when the data back to him... obiously, for this to work I
> need to remove the name's unique constraints, and handle this uniqueness
> manually... can this solution be applied ?
> I would really apressiate some help, thanks.
> Paul.
>

Monday, March 12, 2012

Merge replication issues

We are getting a conflict error message "cannot synchronize, row was updated
outside of replication".
We cannot figure out what is causing this.
Can having different foreign key constraints at a publisher and subscriber
level cause problems with merge replication?
Sorry for the lack of information, but hopefully someone can help!
I have not seen that error message, but based upon my own limited
experiences, I can assure you that different constraints could certainly
create issues.
"llihp" <phill_dutton@.hotmail.com> wrote in message
news:428cb301_1@.x-privat.org...
> We are getting a conflict error message "cannot synchronize, row was
> updated
> outside of replication".
> We cannot figure out what is causing this.
> Can having different foreign key constraints at a publisher and subscriber
> level cause problems with merge replication?
> Sorry for the lack of information, but hopefully someone can help!
>
|||perhaps the row was updated by a process which did not trigger the triggers,
i.e. bcp, dts.
Hilary Cotter
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
"llihp" <phill_dutton@.hotmail.com> wrote in message
news:428cb301_1@.x-privat.org...
> We are getting a conflict error message "cannot synchronize, row was
updated
> outside of replication".
> We cannot figure out what is causing this.
> Can having different foreign key constraints at a publisher and subscriber
> level cause problems with merge replication?
> Sorry for the lack of information, but hopefully someone can help!
>
|||"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eYHGHAPXFHA.2348@.TK2MSFTNGP14.phx.gbl...
> perhaps the row was updated by a process which did not trigger the
triggers,
> i.e. bcp, dts.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
I'm not sure what bcp is(?), but we aren't using any DTS packages within the
application.
Basically we are running a VB application at the sites, and this is
manipulating all the data within the database which is then susposed to be
sent back to the central server. We are having no issues with inserted rows
being replicated, it is only updates which are proving problematic.
|||Hi,
I am also getting the same error. I have multiple publishers with a central
subscriber ( using merge property -exchangetype 2). Please let me know if
there is any answere to it.
One stange thing that I have noticed is following:
I have Publications on Same Articles at 4 sites . Some articles have 4
insert, 4 update and 4 delete triggers but some articles get only 1 trigger
for update, 1 for delete and 1 for insert. Why is this so?
"llihp" wrote:

> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eYHGHAPXFHA.2348@.TK2MSFTNGP14.phx.gbl...
> triggers,
> I'm not sure what bcp is(?), but we aren't using any DTS packages within the
> application.
> Basically we are running a VB application at the sites, and this is
> manipulating all the data within the database which is then susposed to be
> sent back to the central server. We are having no issues with inserted rows
> being replicated, it is only updates which are proving problematic.
>
>
|||Are all the triggers replication related? There should only be one trigger.
You might need to regenerate and resend your snapshot.
Hilary Cotter
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
"Vikas Kohli" <VikasKohli@.discussions.microsoft.com> wrote in message
news:C682F2C2-AFAD-42FC-90C1-F81B1BE12928@.microsoft.com...
> Hi,
> I am also getting the same error. I have multiple publishers with a
central
> subscriber ( using merge property -exchangetype 2). Please let me know if
> there is any answere to it.
> One stange thing that I have noticed is following:
> I have Publications on Same Articles at 4 sites . Some articles have 4
> insert, 4 update and 4 delete triggers but some articles get only 1
trigger[vbcol=seagreen]
> for update, 1 for delete and 1 for insert. Why is this so?
> "llihp" wrote:
the[vbcol=seagreen]
be[vbcol=seagreen]
rows[vbcol=seagreen]

Friday, March 9, 2012

Merge replication in 2005... Version conflict?

I recently Upgraded both of my servers to SQL Server 2005 Standard.
Upon trying to set up Merge replication between the 2, I get this error:
For merge publications, the version of the Subscriber must not exceed the
version of the Publisher. (New Subscription Wizard)
They both have 2005 installed and updated (9.00.1399.00)
They both have the latest MDAC and .net versions
What could be causing this error?
Thanks!
what are the respective OSs? Could you post your publication script here?
Hilary Cotter
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
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:CA2A8A38-E07F-4C16-9C05-F58FA92D61F2@.microsoft.com...
>I recently Upgraded both of my servers to SQL Server 2005 Standard.
> Upon trying to set up Merge replication between the 2, I get this error:
> For merge publications, the version of the Subscriber must not exceed the
> version of the Publisher. (New Subscription Wizard)
> They both have 2005 installed and updated (9.00.1399.00)
> They both have the latest MDAC and .net versions
> What could be causing this error?
> Thanks!
|||They are both Running Windows 2000 server.
Here is the script:
-- Enabling the replication database
use master
exec sp_replicationdboption @.dbname = N'twistpos', @.optname = N'merge
publish', @.value = N'true'
GO
-- Adding the merge publication
use [twistpos]
exec sp_addmergepublication @.publication = N'AccGC', @.description = N'Merge
publication of database ''twistpos'' from Publisher ''SERVER''.', @.sync_mode
= N'native', @.retention = 14, @.allow_push = N'true', @.allow_pull = N'true',
@.allow_anonymous = N'true', @.enabled_for_internet = N'false',
@.snapshot_in_defaultfolder = N'true', @.compress_snapshot = N'false',
@.ftp_port = 21, @.ftp_login = N'anonymous', @.allow_subscription_copy =
N'false', @.add_to_active_directory = N'false', @.centralized_conflicts =
N'true', @.dynamic_filters = N'false', @.conflict_retention = 14,
@.keep_partition_changes = N'true', @.allow_synctoalternate = N'false',
@.max_concurrent_merge = 0, @.max_concurrent_dynamic_snapshots = 0
GO
exec sp_addpublication_snapshot @.publication = N'AccGC', @.frequency_type =
4, @.frequency_interval = 14, @.frequency_relative_interval = 1,
@.frequency_recurrence_factor = 0, @.frequency_subday = 1,
@.frequency_subday_interval = 5, @.active_start_time_of_day = 500,
@.active_end_time_of_day = 235959, @.active_start_date = 0, @.active_end_date =
0, @.snapshot_job_name = N'SERVER-twistpos-AccGC-6'
exec sp_grant_publication_access @.publication = N'AccGC', @.login =
N'BUILTIN\Administrators'
GO
exec sp_grant_publication_access @.publication = N'AccGC', @.login =
N'distributor_admin'
GO
exec sp_grant_publication_access @.publication = N'AccGC', @.login =
N'DOMAIN\Administrator'
GO
exec sp_grant_publication_access @.publication = N'AccGC', @.login = N'sa'
GO
-- Adding the merge articles
use [twistpos]
exec sp_addmergearticle @.publication = N'AccGC', @.article = N'GiftCards',
@.source_owner = N'dbo', @.source_object = N'GiftCards', @.type = N'table',
@.description = N'', @.creation_script = N'', @.pre_creation_cmd = N'drop',
@.schema_option = 0x0000000000004FF1, @.auto_identity_range = N'true',
@.pub_identity_range = 100000, @.identity_range = 100000, @.threshold = 90,
@.destination_owner = N'dbo', @.column_tracking = N'false',
@.subset_filterclause = N'', @.vertical_partition = N'false',
@.verify_resolver_signature = 1, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
use [twistpos]
exec sp_addmergearticle @.publication = N'AccGC', @.article = N'Account',
@.source_owner = N'dbo', @.source_object = N'Account', @.type = N'table',
@.description = N'', @.creation_script = N'', @.pre_creation_cmd = N'drop',
@.schema_option = 0x0000000000006FF1, @.auto_identity_range = N'false',
@.destination_owner = N'dbo', @.column_tracking = N'false',
@.subset_filterclause = N'', @.vertical_partition = N'false',
@.verify_resolver_signature = 1, @.allow_interactive_resolver = N'false',
@.fast_multicol_updateproc = N'true', @.check_permissions = 0
GO
"Hilary Cotter" wrote:

> what are the respective OSs? Could you post your publication script here?
> --
> Hilary Cotter
> 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
> "Ben" <Ben@.discussions.microsoft.com> wrote in message
> news:CA2A8A38-E07F-4C16-9C05-F58FA92D61F2@.microsoft.com...
>
>
|||see this command? delete it,
- it works then - publication_compatibility_level = N'80RTM',
unless your subscriber really is SQL 2000 RTM. I would also advise you to
drop the existing subscription database and recreate it.
Hilary Cotter
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
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:38EC9C88-370F-49D2-9257-D434E8BC6C30@.microsoft.com...[vbcol=seagreen]
> They are both Running Windows 2000 server.
> Here is the script:
> -- Enabling the replication database
> use master
> exec sp_replicationdboption @.dbname = N'twistpos', @.optname = N'merge
> publish', @.value = N'true'
> GO
> -- Adding the merge publication
> use [twistpos]
> exec sp_addmergepublication @.publication = N'AccGC', @.description =
> N'Merge
> publication of database ''twistpos'' from Publisher ''SERVER''.',
> @.sync_mode
> = N'native', @.retention = 14, @.allow_push = N'true', @.allow_pull =
> N'true',
> @.allow_anonymous = N'true', @.enabled_for_internet = N'false',
> @.snapshot_in_defaultfolder = N'true', @.compress_snapshot = N'false',
> @.ftp_port = 21, @.ftp_login = N'anonymous', @.allow_subscription_copy =
> N'false', @.add_to_active_directory = N'false', @.centralized_conflicts =
> N'true', @.dynamic_filters = N'false', @.conflict_retention = 14,
> @.keep_partition_changes = N'true', @.allow_synctoalternate = N'false',
> @.max_concurrent_merge = 0, @.max_concurrent_dynamic_snapshots = 0
> GO
>
> exec sp_addpublication_snapshot @.publication = N'AccGC', @.frequency_type =
> 4, @.frequency_interval = 14, @.frequency_relative_interval = 1,
> @.frequency_recurrence_factor = 0, @.frequency_subday = 1,
> @.frequency_subday_interval = 5, @.active_start_time_of_day = 500,
> @.active_end_time_of_day = 235959, @.active_start_date = 0, @.active_end_date
> =
> 0, @.snapshot_job_name = N'SERVER-twistpos-AccGC-6'
> exec sp_grant_publication_access @.publication = N'AccGC', @.login =
> N'BUILTIN\Administrators'
> GO
> exec sp_grant_publication_access @.publication = N'AccGC', @.login =
> N'distributor_admin'
> GO
> exec sp_grant_publication_access @.publication = N'AccGC', @.login =
> N'DOMAIN\Administrator'
> GO
> exec sp_grant_publication_access @.publication = N'AccGC', @.login = N'sa'
> GO
> -- Adding the merge articles
> use [twistpos]
> exec sp_addmergearticle @.publication = N'AccGC', @.article = N'GiftCards',
> @.source_owner = N'dbo', @.source_object = N'GiftCards', @.type = N'table',
> @.description = N'', @.creation_script = N'', @.pre_creation_cmd = N'drop',
> @.schema_option = 0x0000000000004FF1, @.auto_identity_range = N'true',
> @.pub_identity_range = 100000, @.identity_range = 100000, @.threshold = 90,
> @.destination_owner = N'dbo', @.column_tracking = N'false',
> @.subset_filterclause = N'', @.vertical_partition = N'false',
> @.verify_resolver_signature = 1, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> use [twistpos]
> exec sp_addmergearticle @.publication = N'AccGC', @.article = N'Account',
> @.source_owner = N'dbo', @.source_object = N'Account', @.type = N'table',
> @.description = N'', @.creation_script = N'', @.pre_creation_cmd = N'drop',
> @.schema_option = 0x0000000000006FF1, @.auto_identity_range = N'false',
> @.destination_owner = N'dbo', @.column_tracking = N'false',
> @.subset_filterclause = N'', @.vertical_partition = N'false',
> @.verify_resolver_signature = 1, @.allow_interactive_resolver = N'false',
> @.fast_multicol_updateproc = N'true', @.check_permissions = 0
> GO
> "Hilary Cotter" wrote:
|||You still have it set in 80 compatibility mode.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:CA2A8A38-E07F-4C16-9C05-F58FA92D61F2@.microsoft.com...
>I recently Upgraded both of my servers to SQL Server 2005 Standard.
> Upon trying to set up Merge replication between the 2, I get this error:
> For merge publications, the version of the Subscriber must not exceed the
> version of the Publisher. (New Subscription Wizard)
> They both have 2005 installed and updated (9.00.1399.00)
> They both have the latest MDAC and .net versions
> What could be causing this error?
> Thanks!
|||OK... So here's what I figured out.
In Object Explorer, I see my subscription server as version 9.0.1399, but
the publication server is still marked 8.0.194.
How do I upgrade the publication server to 9.0.1399?
Do I still need to drop the old merge replication? How do I go about that?
Thanks for the help... still new to this 2005 thing.
"Hilary Cotter" wrote:

> see this command? delete it,
> - it works then - publication_compatibility_level = N'80RTM',
> unless your subscriber really is SQL 2000 RTM. I would also advise you to
> drop the existing subscription database and recreate it.
>
> --
> Hilary Cotter
> 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
> "Ben" <Ben@.discussions.microsoft.com> wrote in message
> news:38EC9C88-370F-49D2-9257-D434E8BC6C30@.microsoft.com...
>
>
|||OK, I'm really confused here. Can you issue a select @.@.version on your
publisher and post it here marked publisher, and do the same on your
subscriber and post it here marked subscriber.
You can't create SQL 2005 publications on SQL 2000 publishers - there is
something very wrong here. Besides I was able to repro your problem between
two SQL 2005 machines.
To drop the existing merge publications, right click on it in Enterprise
Manager or SQL Server Management Studio. and select Delete.
Hilary Cotter
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
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:3B87E513-4C0E-4294-B45D-273485DDD94F@.microsoft.com...[vbcol=seagreen]
> OK... So here's what I figured out.
> In Object Explorer, I see my subscription server as version 9.0.1399, but
> the publication server is still marked 8.0.194.
> How do I upgrade the publication server to 9.0.1399?
> Do I still need to drop the old merge replication? How do I go about that?
> Thanks for the help... still new to this 2005 thing.
> "Hilary Cotter" wrote:
|||Just change the database compatibility level within the database properties.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:3B87E513-4C0E-4294-B45D-273485DDD94F@.microsoft.com...[vbcol=seagreen]
> OK... So here's what I figured out.
> In Object Explorer, I see my subscription server as version 9.0.1399, but
> the publication server is still marked 8.0.194.
> How do I upgrade the publication server to 9.0.1399?
> Do I still need to drop the old merge replication? How do I go about that?
> Thanks for the help... still new to this 2005 thing.
> "Hilary Cotter" wrote:
|||The instance had not been updated. Reattatched and everything was fine.
Thanks for the help.
Ben
"Michael Hotek" wrote:

> Just change the database compatibility level within the database properties.
> --
> Mike
> http://www.solidqualitylearning.com
> Disclaimer: This communication is an original work and represents my sole
> views on the subject. It does not represent the views of any other person
> or entity either by inference or direct reference.
> "Ben" <Ben@.discussions.microsoft.com> wrote in message
> news:3B87E513-4C0E-4294-B45D-273485DDD94F@.microsoft.com...
>
>

Saturday, February 25, 2012

Merge Replication Custom Conflict Resolver

Hi.
Anybody knows where can I find more info about "Merge replication custom
conflict resolver"?
I have readed the "Chapter 30" of "SQL Server 2000 Resource Kit" but it's
very little. I need more details.
Thanks and greetings.
Thanks but I need a COM based conflict resolver because SP is only for
update conflicts.
|||I do not find much more than you. The 1st document are about SQL Server 2005
and the second already have read it.
Greetings.

merge replication conflict tables stored proces and views

We have merge replication running with anamous subscribers
We have generested lots of views tables and stored procedures like
sp_ins_C435D35DDEC04FE2517CCD52A9024EC4

ctsv_07BA7383A12B4654B4D3A69B3053B227
aonflict_DH_tblReplicationRegion

How do we get rud of these I am concerned it will fill up the publisher database
Can any one advisehttp://www.databasejournal.com/features/mssql/article.php/1468971 (http://www.databasejournal.com/features/mssql/article.php/1468971)
http://www.databasejournal.com/features/mssql/article.php/1438231 (http://www.databasejournal.com/features/mssql/article.php/1438231)
Fyi.

Merge Replication Conflict Resolution Latency?

I've been having a hard time finding a definitive answer about merge
replication and any sort of latency on a transaction between a
subscriber and publisher. I apologize in advance for the lengthy post,
but it's difficult to really "cut to the meat" of this one
Here's my scenario: I'm developing a .NET CF application on a PocketPC
that stores data in a SQL CE database that merges with a SQL 2000
publisher when the PDA is docked. Generally speaking, what goes up is
properly reflected when it comes back down via a "is complete" row
filter that simply looks for a flag that is set to 1. For example:
-Publisher has 128 rows
-PDA has 128 rows, 28 rows have been "completed"
-Instantiate merge with publisher
-Result is that there are 128 rows on publisher, 28 are complete, row
filter disregards 28 complete records and sends down 100 records that
are still incomplete to PDA
This seems to work great. Now enter conflicts. I have the resolver set
such that the subscriber always wins. We've had several cases where the
server has been under moderate to heavy load, and there have been a lot
of conflicts. This was an actual occurrence:
-Publisher has 79 rows
-PDA has 79 rows, 69 rows have been "completed"
-Publisher had 79 rows *removed*
-Instantiate merge with publisher
-Result is that there are 69 conflicts at publisher, the subscriber wins
all, but there are still *79* rows on the PDA after merge finishes
-I wait a minute and try again, this time there are about 50 rows on the
subscriber
-I repeat this process several times over the course of 5 minutes until
finally, I am left with the correct number of records on the PDA (0)
My question is, is this normal behavior for the resolver? Are conflicts
generally allowed to be "handed off" and the merge allowed to complete
without reflecting their outcome? If so, is there any way to tune or
change this behavior?
This also has me concerned about a normal merge without any conflicts.
Would there ever be a case in which a merge would get out of sync in
this way? My understanding is that instantiating a merge will always
result in both the supplying subscriber and publisher ending up with the
same data at that moment. My merge agents are all using the default
profile.
Thanks a BUNCH for any help you can offer. I've had an impossible time
answering these questions and I'm a programmer before a DBA
-Mike
Mike wrote:

> -Publisher has 79 rows
> -PDA has 79 rows, 69 rows have been "completed"
> -Publisher had 79 rows *removed*
> -Instantiate merge with publisher
> -Result is that there are 69 conflicts at publisher, the subscriber wins
> all, but there are still *79* rows on the PDA after merge finishes
> -I wait a minute and try again, this time there are about 50 rows on the
> subscriber
> -I repeat this process several times over the course of 5 minutes until
> finally, I am left with the correct number of records on the PDA (0)
I apologize, I had my scenarios crossed. This should have read:
-Publisher has 79 rows
-PDA has 79 rows, 69 rows have been "completed"
-Publisher had all 79 rows *modified*
-Instantiate merge with publisher
-Result is that there are 69 conflicts at publisher, the subscriber wins
all and they are noted as resolved in the agent history, but there are
still *79* rows on the PDA after merge finishes
-I wait a minute and try again, this time there are about 50 rows on the
subscriber
-I repeat this process several times over the course of 5 minutes, each
time the number of rows at the subscriber decreases, until finally, I am
left with the correct number of records on the PDA (10)
Thanks
-Mike

Merge Replication Conflict Problem

exec sp_helpmergeconflictrows @.conflict_table = 'CMCustomer'

Msg 207, Level 16, State 1, Line 1

Invalid column name 'origin_datasource_id'.


When I run the "Microsoft Replication Conflict View" I am prompted to pick a table. Here are the details of the error message I receive.

===================================

CMCustomer is neither a DataColumn nor a DataRelation for table summary. (System.Data)


Program Location:

at System.Data.DataRowView.get_Item(String property)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.GetWinnerSQL(DataRow loserRow, Boolean blockFetch)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.GetSourceRow()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.FillDetailData()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.FillDetail()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.summaryInfoGrid_SelectionChanged(Object sender, SelectionChangedEventArgs args)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.OnSelectionChanged(BlockOfCellsCollection selectedCells)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.SelectedCellsInternal(BlockOfCellsCollection col, Boolean bSet)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.set_SelectedCells(BlockOfCellsCollection value)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.ResetSummaryGrid()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.LoadConflict()

When I try to "Remove" then conflict (Conflict type - "4(Update/Delete, Update wins)") I receive the following...

===================================

Column 'CMCustomer' does not belong to table summary. (System.Data)


Program Location:

at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.SetLogInfo(DataRow logRow, String sql)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.btnClearUpper_Click(Object sender, EventArgs eg)

Grant,

Please let me know if my assumptions are incorrect:

I believe CMCustomer is a rowguid column.

This column was added by the user and snapshot did not add this.

This happens on delete conflicts.

If these are correct, then it is a known issue and should be fixed in SP2.

|||

Yes, CMCustomer is the rowguidcol of the CMCustomer table.

"This column was added by the user and snapshot did not add this." Are you saying the column metadata changed at some point?

|||No, what I am saying is when you created the table with this column and it was of type uniqueidentifier and it was designated as the rowguidcol. In case such a column does not exist in the table, snapshot agent will add one and name it as a rowguid. The bug happens because the name is not rowguid and UI was trying to find a column with this name.|||Ok. Thanks.

Merge Replication Conflict Notification

SQL2K SP4
Windows 2000 server
Merge Replication

How can I get sql server to log to the windows event long when a conflict occurs so that I can set up a notification alert. I have gone to the replication alerts in enterprise manager and set one up but it is never triggered and there is never anything in the windows event log.If it's not raised that means it was never triggered.

Merge Replication Conflict - Primary Key Constraint

I have an application that uses Merge Replication. In my database design,
before I created the merge replication publication, I modified the tables and
set my identity columns to Yes (Not for replication) option.
I am hitting a problem however, when I try to insert a new row in one of the
tables and then replicate the data back to the server. I am getting a
conflict with the reason being:
Reason Type 5, Reason code 2627
Reason Text:
The row was inserted at Subscriber.x' but could not be inserted at Server.X.
Violation of PRIMARY KEY constraint 'PK_X'. Cannot insert duplicate key in
object X.
I thought that having Not for replication option set for identity columns
would cause replication to use the server and/or subscriber environment to
generate identity column values on inserts.
Any help would be greatly appreciated.
Hi Guy - you'll need to partition the identity ranges to avoid identity
conflicts.
The easiest, most maintainable way is to change the article properties to
enable Automatic identity range management and then reinitialize.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Thanks Paul. I will try this out and see if the problem is resolved. My
apologies for this message posting so many times. My browser was acting up
and reporting an error when I posted. So I thought my post had failed.
One Question: Do you know why this is happening. I must not be
understanding the purpose of not for replication option. Because I thought
this is what would resolve this type of problem.
"Paul Ibison" wrote:

> Hi Guy - you'll need to partition the identity ranges to avoid identity
> conflicts.
> The easiest, most maintainable way is to change the article properties to
> enable Automatic identity range management and then reinitialize.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>
|||The NFT replication allows replication agents to do an identity insert when
distributing changes. However if the renge isn't partitioned, there will
still be a conflict.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Monday, February 20, 2012

Merge replication and conflict tables.

If you are making schema changes you should be using sp_repladdcolumn, and
sp_repldropcolumn.
You can't delete the conflict tables using EM, but you can using
sp_droptable through ISQLW
You really don't have to delete these tables. If you are creating a new
publication SQL Server will detect these existing tables and then create new
ones based on the existing name but incrementing by 1 letter.
So conflict_pubs2_authors would be the first table, aonflict_pubs2_pubs the
second, bonflict_pubs2_pubs the third, donflict_pubs2_pubs the fourth, etc.
"mary" <mary@.dbagua.com> wrote in message
news:eN3enz0FEHA.2876@.TK2MSFTNGP09.phx.gbl...
> Hi, I configured a merge replication with pull subscription. I need to
> do some changes on the table structure so, i delete the replication, do
> the changes and configure the replication again.
> I saw that every time the publication is configured it creates some
> conflict tables but dont delete the conflict tables that the first
> publication used.
> I try to delete this tables but i cant because are system tables.
> Do you know if there is a way that i can delete this tables?
> Thanks a lot for your help.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
I was having trouble adding column to tables that are=20
being replicated using EM and I get a message saying=20
that "Cannot alter column ... because it is 'REPLICATED'.=20
I was directed to the following knowledge base article=20
listed below to correct the problem. Will using=20
sp_repladdcolumn and sp_repldropcolumn prevent this?
http://support.microsoft.com/default.aspx?scid=3DKB;EN-
US;811899

>--Original Message--
>If you are making schema changes you should be using=20
sp_repladdcolumn, and
>sp_repldropcolumn.
>You can't delete the conflict tables using EM, but you=20
can using
>sp_droptable through ISQLW
>You really don't have to delete these tables. If you are=20
creating a new
>publication SQL Server will detect these existing tables=20
and then create new
>ones based on the existing name but incrementing by 1=20
letter.
>So conflict_pubs2_authors would be the first table,=20
aonflict_pubs2_pubs the
>second, bonflict_pubs2_pubs the third,=20
donflict_pubs2_pubs the fourth, etc.
>
>"mary" <mary@.dbagua.com> wrote in message
>news:eN3enz0FEHA.2876@.TK2MSFTNGP09.phx.gbl...
subscription. I need to
the replication, do
creates some
that the first
system tables.
tables?
http://www.codecomments.com ***
>
>.
>
|||Hi Emma,
Yes. Using sp_repladdcolumn and sp_repldropcolumn would solve your problem while changing the schema for any table.
Regards,
Karthik.