Showing posts with label deleting. Show all posts
Showing posts with label deleting. Show all posts

Monday, March 12, 2012

Merge Replication Mysteriously Deleting Rows

I am running a simple merge replication in SQL Server 2000. I have one database that is the publisher, and a second database that is the subscriber. When I add a new row to the subscriber it will replicate to the publisher as expected. However, the new row at the subscriber will then be deleted without explanation. The row will remain at the publisher though.

Does anyone know why it is doing this?

What does your subset filter clause look like? If you insert a row that shouldn't be in your partition, merge replication will delete it from the subscriber. The whole point of filtering is to have only rows in your filter remain on the subscriber.|||

Some of the tables on the publisher have more columns than the respective tables on the subscriber. So there is vertical filtering. For example, a sensitive date will not be part of the replication.

|||I was talking about horizontal filtering. Are you filtering using HOSTNAME, or SUSER_SNAME, or some other static filtering?|||

I am using horizontal filtering on two tables. It's a simple "where bit = 1" filter. For example if a special flag is true then the publisher will replicate it to the subscriber. Of course, for the subscriber this value will always be true. Like I said, I am not doing anything really complex.

The weird thing is that these two tables are not the tables I am having problems with.

|||THen you need to provide more information about the article and values so we can help you. IS this article part of a join filter?|||

I think I have solved the problem. When I setup the horizontal filtering, it automatically extended some of the filters and created join filters. When I removed the join filters, the rows stopped being deleted. I will need to create some join filters to ensure that the subscriber only gets the data it needs, but the wizard created join filters all over the place.

Thanks for your help Greg

|||I haven't played around with the wizards in a while, but i will bet it can create joins for all the pk/fk relationships, which makes sense if you want horizontal filtering. Just keep an eye on it.

Merge replication is deleting records

I have a merge replication of some tables between two servers. Something
curious happens. When I insert a register in a table in one database, then I
wait and the other table in the database doesn't update the new register and
I refresh the view in my original database and the record I inserted is not
there anymore. Is like when I added the record he found that is not in the
other site so he thinks he should delete it instead of inserting in the
other site. Why this happens? Is it a bug of replication?
This is scaring me because the same problem in this lilte table is happening
in a master table where I keep inventory, by some reason sometimes (not very
often) a record is being deleted and I sopposed is for the replication
because the process inserts the record in one place and then he finds that
this record is not in the other place and instead of inserting he deletes
the record.
Please help me because I can't miss any of this records, what can I do, how
can I trace what happened? I created a trigger for delete that inserts in a
new table every time a register is being deleted in this master table and he
inserted the deleted record in this table but how can I trace how was
deleted?
Please help me with this replication problem
Thanks in advance
Jennyfer
Jennyfer ,
do you have filters on the publication?
This scenario could occur if the record doesn't satisfy the filter, so an
insert on the subscriber will be uploaded then downloaded as a delete.
HTH,
Paul Ibison
|||I don't have any filters
Thanks
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23e$%231fBdEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Jennyfer ,
> do you have filters on the publication?
> This scenario could occur if the record doesn't satisfy the filter, so an
> insert on the subscriber will be uploaded then downloaded as a delete.
> HTH,
> Paul Ibison
>
|||Would it be the case that this insert violates some constraint (PK, FK,
check, etc) at the subscriber?
Hope that helps
--Mahesh
[ This posting is provided "as is" with no warranties and confers no
rights. ]
"Jennyfer J Barco" <pdwhitt@.nospam.wdsinc.com> wrote in message
news:urTZBYCdEHA.3728@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> I don't have any filters
> Thanks
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:%23e$%231fBdEHA.4092@.TK2MSFTNGP10.phx.gbl...
an
>
|||To find out a bit more info you might want to...
To see who is doing the delete...select publisher_insertcount,
publisher_updatecount, publisher_deletecount,
subscriber_insertcount, subscriber_updatecount, subscriber_deletecount
from dbo.MSmerge_history
Run profiler on the publisher and subscriber to see why/how the delete is
being done.
Check the conflict viewer to see if any conflicts are registered.
HTH,
Paul Ibison
|||Thanks so much for the constraint idea (PK, FK...) I have a FOREIGN KEY in
the master table that the product register should exists in another table
wich is beign replicated too. It looks that he tryed to insert the master
register and the other table was not replicated yet so the error in the
confict_Mergename_mastertable table says that the insert in the other site
conflicted with the FOREIGN KEY and my records that were deleted are in this
table. The thing is, if there is a problem like this and SQL can't insert
the register in the other site but should not delete the record in my site
where it was originated inserted. Is there any settings where I can say that
if an insert error comes don't delete the original record just write in this
log table that the record was not replicated. Please give me an idea and
thanks so much for you help and tips
Jennyfer
"Mahesh [MSFT]" <maheshrd@.hotmail.com> wrote in message
news:eClCOeEdEHA.3300@.TK2MSFTNGP09.phx.gbl...
> Would it be the case that this insert violates some constraint (PK, FK,
> check, etc) at the subscriber?
> Hope that helps
> --Mahesh
> [ This posting is provided "as is" with no warranties and confers no
> rights. ]
> "Jennyfer J Barco" <pdwhitt@.nospam.wdsinc.com> wrote in message
> news:urTZBYCdEHA.3728@.TK2MSFTNGP09.phx.gbl...
> an
>
|||One thing that caused this was because the replication stopped wth no reason
in the weekend and then we started again. It looks thar SQL trys to insert
all the transactions that were not inserted while it was stopped and in this
there is no order or priority with the tables( maybe he sorts
alphabeticaly). May I define a priority so always when I start synchronizing
the outer reference tables comes first? May I select the order of the tables
in which I want the replication to start?
Thanks so much
"Jennyfer J Barco" <pdwhitt@.nospam.wdsinc.com> wrote in message
news:u8V6DXMdEHA.3728@.TK2MSFTNGP09.phx.gbl...
> Thanks so much for the constraint idea (PK, FK...) I have a FOREIGN KEY in
> the master table that the product register should exists in another table
> wich is beign replicated too. It looks that he tryed to insert the master
> register and the other table was not replicated yet so the error in the
> confict_Mergename_mastertable table says that the insert in the other site
> conflicted with the FOREIGN KEY and my records that were deleted are in
this
> table. The thing is, if there is a problem like this and SQL can't insert
> the register in the other site but should not delete the record in my site
> where it was originated inserted. Is there any settings where I can say
that
> if an insert error comes don't delete the original record just write in
this[vbcol=seagreen]
> log table that the record was not replicated. Please give me an idea and
> thanks so much for you help and tips
> Jennyfer
> "Mahesh [MSFT]" <maheshrd@.hotmail.com> wrote in message
> news:eClCOeEdEHA.3300@.TK2MSFTNGP09.phx.gbl...
so[vbcol=seagreen]
delete.
>
|||Basically you are running into the compensate_for_errors problem.
This problem is that if a change from publisher (say) fails to get applied
at the subscriber (for some reason, PK,FK,CHECK,etc constraints) it undoes
the change at the publisher. So a insert from publisher when fails at the
subscriber gets deleted at the publisher too. Similary a delete from
publisher when fails at the subscriber, it gets re-inserted at the
publisher.
The KB article for that is here:
http://support.microsoft.com/default...&Product=sql2k
This is fixed in a QFE and please contact PSS for the QFE.
Hope that helps
--Mahesh
[ This posting is provided "as is" with no warranties and confers no
rights. ]
"Jennyfer J Barco" <pdwhitt@.nospam.wdsinc.com> wrote in message
news:u8V6DXMdEHA.3728@.TK2MSFTNGP09.phx.gbl...
> Thanks so much for the constraint idea (PK, FK...) I have a FOREIGN KEY in
> the master table that the product register should exists in another table
> wich is beign replicated too. It looks that he tryed to insert the master
> register and the other table was not replicated yet so the error in the
> confict_Mergename_mastertable table says that the insert in the other site
> conflicted with the FOREIGN KEY and my records that were deleted are in
this
> table. The thing is, if there is a problem like this and SQL can't insert
> the register in the other site but should not delete the record in my site
> where it was originated inserted. Is there any settings where I can say
that
> if an insert error comes don't delete the original record just write in
this[vbcol=seagreen]
> log table that the record was not replicated. Please give me an idea and
> thanks so much for you help and tips
> Jennyfer
> "Mahesh [MSFT]" <maheshrd@.hotmail.com> wrote in message
> news:eClCOeEdEHA.3300@.TK2MSFTNGP09.phx.gbl...
so[vbcol=seagreen]
delete.
>
|||Don't forget this:
One thing that caused this was because the replication stopped wth no reason
in the weekend and then we started again. It looks thar SQL trys to insert
all the transactions that were not inserted while it was stopped and in this
there is no order or priority with the tables( maybe he sorts
alphabeticaly). May I define a priority so always when I start synchronizing
the outer reference tables comes first? May I select the order of the tables
in which I want the replication to start?
Thanks so much
"Mahesh [MSFT]" <maheshrd@.hotmail.com> wrote in message
news:%23Yz$O9MdEHA.1692@.tk2msftngp13.phx.gbl...
> Basically you are running into the compensate_for_errors problem.
> This problem is that if a change from publisher (say) fails to get applied
> at the subscriber (for some reason, PK,FK,CHECK,etc constraints) it undoes
> the change at the publisher. So a insert from publisher when fails at the
> subscriber gets deleted at the publisher too. Similary a delete from
> publisher when fails at the subscriber, it gets re-inserted at the
> publisher.
> The KB article for that is here:
>
http://support.microsoft.com/default...&Product=sql2k[vbcol=seagreen]
> This is fixed in a QFE and please contact PSS for the QFE.
> Hope that helps
> --Mahesh
> [ This posting is provided "as is" with no warranties and confers no
> rights. ]
> "Jennyfer J Barco" <pdwhitt@.nospam.wdsinc.com> wrote in message
> news:u8V6DXMdEHA.3728@.TK2MSFTNGP09.phx.gbl...
in[vbcol=seagreen]
table[vbcol=seagreen]
master[vbcol=seagreen]
site[vbcol=seagreen]
> this
insert[vbcol=seagreen]
site[vbcol=seagreen]
> that
> this
FK,[vbcol=seagreen]
filter,
> so
> delete.
>
|||You cannot specify the processing order in SQL Server 2000.
There is a possibility as you say that some changes could go before the
others that can cause this kind of conflicting behavior.
However if the PKs and FKs were defined as NOT FOR REPLICATION then probably
you would not have hit this error.
Or had there been merge filters between the articles, probably they would
have been enumerated in the proper order too.
So what is the current state? Has it synched up now?
If you make any inserts to tables at the publisher do you see them
propagated to the subscriber?
Hope that helps
--Mahesh
[ This posting is provided "as is" with no warranties and confers no
rights. ]
"Jennyfer J Barco" <pdwhitt@.nospam.wdsinc.com> wrote in message
news:uxUYZaOdEHA.3632@.TK2MSFTNGP09.phx.gbl...
> Don't forget this:
> One thing that caused this was because the replication stopped wth no
reason
> in the weekend and then we started again. It looks thar SQL trys to insert
> all the transactions that were not inserted while it was stopped and in
this
> there is no order or priority with the tables( maybe he sorts
> alphabeticaly). May I define a priority so always when I start
synchronizing
> the outer reference tables comes first? May I select the order of the
tables[vbcol=seagreen]
> in which I want the replication to start?
> Thanks so much
> "Mahesh [MSFT]" <maheshrd@.hotmail.com> wrote in message
> news:%23Yz$O9MdEHA.1692@.tk2msftngp13.phx.gbl...
applied[vbcol=seagreen]
undoes[vbcol=seagreen]
the
>
http://support.microsoft.com/default...&Product=sql2k[vbcol=seagreen]
KEY[vbcol=seagreen]
> in
> table
> master
the[vbcol=seagreen]
> site
in[vbcol=seagreen]
> insert
> site
say[vbcol=seagreen]
in[vbcol=seagreen]
and
> FK,
> filter,
>

Wednesday, March 7, 2012

Merge replication deleting inserts on subscriber duringsynchronisation

I am having a problem with merge replication in that inserts at the
subscriber are being deleted after synchronising. In a test the
results show up as 1 insert, 1 delete, 0 conflicts (for a single
record created). After synchronising the new record is correctly
inserted on the server but is deleted on the subscriber - this delete
should not be occuring according to the filters set. The replication
was working OK before but I have made some significant changes.
The merge replication is using web synchronisation with RMO in the
application. The publication has several articles, some of them
download only, with row parameterisation using HOST_NAME and
overlapping partitions. There is a table of clients including a field
for the host names (nvarchar(32)) as the basis for the filtering.
The system is currently on a development server running SQL Server
2005 Workgroup edition with the clients running SQL Server 2005
Express. I have been developing the deployment of the application
which has involved some changes, most significantly (I think):
- the subscriber database is now initially created by scripts (i.e.
create database, create table, etc) rather than attaching a previously
created database
- the initial snapshot is initiated by the subscriber
- the data on the subscriber is populated from the download tables on
first synchronisation
I suspect it is something to do with partitioning and the filtering
but I am not sure what is wrong and how to rectify the situation. (If
I set the @.partition_options to 2 or 3 it produces a conflict error
saying that out of partition changes are not allowed - for that
article the data is non-overlapping).
Some additional notes and some of the key settings:
PUBLICATION SETTINGS:
@.allow_pull = N'true'
@.allow_anonymous = N'true'
@.enabled_for_internet = N'false'
@.allow_subscription_copy = N'false'
@.dynamic_filters = N'true'
@.validate_subscriber_info = N'HOST_NAME()'
@.use_partition_groups = N'true'
@.allow_subscriber_initiated_snapshot = N'true'
@.allow_web_synchronization = N'true'
@.allow_partition_realignment = N'true'
EXAMPLE ARTICLE SETTINGS:
@.subscriber_upload_options = 0 (no restrictions)
@.partition_options = 0 (overlapping; 2 and 3 produce conflict errors)
@.check_permissions = 0 (permissions not checked)
@.subset_filterclause = N'[Computer] = (Select ComputerID From
Computers Where ComputerName = HOST_NAME())'
@.column_tracking = N'false'
@.vertical_partition = N'false'
(other articles have similar (though more complex) filter clauses or
have a join based on the one above)
SUBSCRIPTION SETTINGS:
@.subscriber_type = N'anonymous'
@.subscription_priority = 0
@.sync_type = N'Automatic'
SUBSCRIPTION AGENT SETTINGS:
@.distributor_security_mode (set in RMO to standard/SQL)
@.publisher_security_mode (set in RMO to standard/SQL)
@.internet_security_mode = 0 (SQL)
Subscriptions initiated by subscribers do not appear in list under
"Data Partitions" in the Publication Properties on the server whereas
they seemed to before when the subscription was added through SSMS on
the server.
There is no specific snapshot folder generated for the subscriber as
seemed to be the case when the subscription was added through SSMS on
the server.
In the Replication Monitor the subscriber-initiated subscription
appears several times; possibly due to uninstalling and re-installing
(and hence re-initialising) the same subscriber several times during
development.
The client subscription appears (just once) in the
sysmergesubscriptions and MSmerge_subscriptions tables on the server.
Any help on this greatly appreciated. I am relatively new to
replication so please let me know if there are any key settings I have
ommitted from this post and please forgive me if I have missed
something stupid.
can you script out the problem table(s) and post your publication and
subscription scripts here?
http://www.zetainteractive.com - Shift Happens!
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
"JDS" <admin@.jeremysage.com> wrote in message
news:ceaf1828-88f3-4418-aaab-2fe6a3dbd576@.s12g2000prg.googlegroups.com...
>I am having a problem with merge replication in that inserts at the
> subscriber are being deleted after synchronising. In a test the
> results show up as 1 insert, 1 delete, 0 conflicts (for a single
> record created). After synchronising the new record is correctly
> inserted on the server but is deleted on the subscriber - this delete
> should not be occuring according to the filters set. The replication
> was working OK before but I have made some significant changes.
> The merge replication is using web synchronisation with RMO in the
> application. The publication has several articles, some of them
> download only, with row parameterisation using HOST_NAME and
> overlapping partitions. There is a table of clients including a field
> for the host names (nvarchar(32)) as the basis for the filtering.
> The system is currently on a development server running SQL Server
> 2005 Workgroup edition with the clients running SQL Server 2005
> Express. I have been developing the deployment of the application
> which has involved some changes, most significantly (I think):
> - the subscriber database is now initially created by scripts (i.e.
> create database, create table, etc) rather than attaching a previously
> created database
> - the initial snapshot is initiated by the subscriber
> - the data on the subscriber is populated from the download tables on
> first synchronisation
> I suspect it is something to do with partitioning and the filtering
> but I am not sure what is wrong and how to rectify the situation. (If
> I set the @.partition_options to 2 or 3 it produces a conflict error
> saying that out of partition changes are not allowed - for that
> article the data is non-overlapping).
> --
> Some additional notes and some of the key settings:
> PUBLICATION SETTINGS:
> @.allow_pull = N'true'
> @.allow_anonymous = N'true'
> @.enabled_for_internet = N'false'
> @.allow_subscription_copy = N'false'
> @.dynamic_filters = N'true'
> @.validate_subscriber_info = N'HOST_NAME()'
> @.use_partition_groups = N'true'
> @.allow_subscriber_initiated_snapshot = N'true'
> @.allow_web_synchronization = N'true'
> @.allow_partition_realignment = N'true'
> EXAMPLE ARTICLE SETTINGS:
> @.subscriber_upload_options = 0 (no restrictions)
> @.partition_options = 0 (overlapping; 2 and 3 produce conflict errors)
> @.check_permissions = 0 (permissions not checked)
> @.subset_filterclause = N'[Computer] = (Select ComputerID From
> Computers Where ComputerName = HOST_NAME())'
> @.column_tracking = N'false'
> @.vertical_partition = N'false'
> (other articles have similar (though more complex) filter clauses or
> have a join based on the one above)
> SUBSCRIPTION SETTINGS:
> @.subscriber_type = N'anonymous'
> @.subscription_priority = 0
> @.sync_type = N'Automatic'
> SUBSCRIPTION AGENT SETTINGS:
> @.distributor_security_mode (set in RMO to standard/SQL)
> @.publisher_security_mode (set in RMO to standard/SQL)
> @.internet_security_mode = 0 (SQL)
> Subscriptions initiated by subscribers do not appear in list under
> "Data Partitions" in the Publication Properties on the server whereas
> they seemed to before when the subscription was added through SSMS on
> the server.
> There is no specific snapshot folder generated for the subscriber as
> seemed to be the case when the subscription was added through SSMS on
> the server.
> In the Replication Monitor the subscriber-initiated subscription
> appears several times; possibly due to uninstalling and re-installing
> (and hence re-initialising) the same subscriber several times during
> development.
> The client subscription appears (just once) in the
> sysmergesubscriptions and MSmerge_subscriptions tables on the server.
> --
> Any help on this greatly appreciated. I am relatively new to
> replication so please let me know if there are any key settings I have
> ommitted from this post and please forgive me if I have missed
> something stupid.
|||Update:
I have managed to resolve this, so for the benefit of anyone else that
comes across the same problem, the details as follows.
The main problem was not specifying the @.hostname parameter in the
sp_addmergepullsubscription_agent stored procedure when setting up the
client. Unfortunately, it does not seem easy to set the parameter to
the host name dynamically. This is the script I ended up using
(sensitive values set to *s):
-- Parameters for sp_executesql
DECLARE @.SQLCommand nvarchar(1000)
DECLARE @.ParameterList nvarchar(1000)
-- Parameters for sp_addmergepullsubscription_agent
DECLARE @.Publisher_Name sysname
DECLARE @.Publisher_db_Name sysname
DECLARE @.Publication_Name sysname
DECLARE @.SyncMgr_Value nvarchar(5)
DECLARE @.UseResolver_Value nvarchar(5)
DECLARE @.URL_Name nvarchar(260)
DECLARE @.Login_Name sysname
DECLARE @.Password_Name nvarchar(524)
DECLARE @.Client_Name sysname
SET @.Publisher_Name = N'DILBERT\SQLSERVER2005'
SET @.Publisher_db_Name = N'WeightData'
SET @.Publication_Name = N'Synchronisation'
SET @.SyncMgr_Value = N'True'
SET @.UseResolver_Value = N'False'
SET @.URL_Name = N'https://server.*******.com/SQLReplication/
replisapi.dll'
SET @.Login_Name = N'*******'
SET @.Password_Name = '*******'
SET @.Client_Name = HOST_NAME()
-- Other settings specified in RMO code
SET @.SQLCommand = N'EXEC sp_addmergepullsubscription_agent @.publisher
= @.Publisher_Name, @.publisher_db = @.Publisher_db_Name, @.publication =
@.Publication_Name, @.enabled_for_syncmgr = @.SyncMgr_Value,
@.frequency_type = 2, @.use_interactive_resolver = @.UseResolver_Value,
@.use_web_sync = 1, @.internet_url = @.URL_Name, @.internet_login =
@.Login_Name, @.internet_password = @.Password_Name,
@.internet_security_mode = 0, @.internet_timeout = 300, @.hostname =
@.Client_Name'
SET @.ParameterList = N'@.Publisher_Name sysname, @.Publisher_db_Name
sysname, @.Publication_Name sysname, @.SyncMgr_Value nvarchar(5),
@.UseResolver_Value nvarchar(5), @.URL_Name nvarchar(260), @.Login_Name
sysname, @.Password_Name nvarchar(524), @.Client_Name sysname'
EXEC sp_executesql @.SQLCommand, @.ParameterList, @.Publisher_Name =
@.Publisher_Name, @.Publisher_db_Name = @.Publisher_db_Name,
@.Publication_Name = @.Publication_Name, @.SyncMgr_Value =
@.SyncMgr_Value, @.UseResolver_Value = @.UseResolver_Value, @.URL_Name =
@.URL_Name, @.Login_Name = @.Login_Name, @.Password_Name = @.Password_Name,
@.Client_Name = @.Client_Name
This seems cumbersome (but works). If anyone can show a simpler method
then please let us know.

Merge Replication deleting data

Hi,
We have a huge problem at the moment with merge replication deleting
data in our tables. Im running MS SQL 2000 SP4 and have several
subscribers syncing their data back to the publisher on a daily basis.
For some reason records are getting deleted out of 2 tables which have
a parent child relationship. The parent table is a header information
table about our orders and the child table is the detail of the order.
I have been reading about this problem in several groups and have
already unchecked the "Enforce relationships for replication" check box
for all replicated tables. This has stopped our constraint errors from
appearing in the conflict tables but the data is still getting deleted.
I can not narrow it down on why this data is getting deleted, I do know
that users cant delete these records and the deletions are
inconsistent.
Can someone please help me with this problem as millions of dollars
worth of orders are at stake!
Ben
Benzine - can you check to see if this is a compensating changes situation:
http://support.microsoft.com/default.aspx?scid=kb;en-us;828637&Product=sql2k
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Are the missing rows logged in the conflict tables? View them using the
conflict viewer.
Are you also using join filters?
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
"Benzine" <bfausti@.gmail.com> wrote in message
news:1168319333.389814.90990@.i15g2000cwa.googlegro ups.com...
> Hi,
> We have a huge problem at the moment with merge replication deleting
> data in our tables. Im running MS SQL 2000 SP4 and have several
> subscribers syncing their data back to the publisher on a daily basis.
> For some reason records are getting deleted out of 2 tables which have
> a parent child relationship. The parent table is a header information
> table about our orders and the child table is the detail of the order.
> I have been reading about this problem in several groups and have
> already unchecked the "Enforce relationships for replication" check box
> for all replicated tables. This has stopped our constraint errors from
> appearing in the conflict tables but the data is still getting deleted.
>
> I can not narrow it down on why this data is getting deleted, I do know
> that users cant delete these records and the deletions are
> inconsistent.
> Can someone please help me with this problem as millions of dollars
> worth of orders are at stake!
> Ben
>
|||HI Hilary,
Thanks for your reply,
No the missing rows are not logged anywhere, and there are no join
filters being used.
The version which are running at the publisher and the subscribers are
different, would this be the cause of this problem?
The publisher is running MS SQL 2000 SP4, and the subscribers are all
running MS SQL Desktop Engine SP3.
Regards,
Ben
On Jan 9, 10:19 pm, "Hilary Cotter" <hilary.cot...@.gmail.com> wrote:[vbcol=seagreen]
> Are the missing rows logged in the conflict tables? View them using the
> conflict viewer.
> Are you also using join filters?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTShttp://www.indexserverfaq.com
> "Benzine" <bfau...@.gmail.com> wrote in messagenews:1168319333.389814.90990@.i15g2000cwa.go oglegroups.com...
>
>
>
>
|||I dont think this is the case as the server seems to be running SP4.
The subscribers however are running MS SQL 2000 Desktop Engine SP3,
will this cause the issue?
On Jan 9, 8:14 pm, "Paul Ibison" <Paul.Ibi...@.Pygmalion.Com> wrote:
> Benzine - can you check to see if this is a compensating changes situation:http://support.microsoft.com/default.aspx?scid=kb;en-us;828637&Produc...
> Cheers,
> Paul Ibison SQL Server MVP,www.replicationanswers.com.
|||But the default for the compensate_for_errors parameter is true. Pls try
setting it to false and see if this eliminates the problem.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Hi Paul,
On further review I think you are correct, but when I try to set the
parameter I get the following message:
"Every SQL Server Subscriber of publication '[Publication Name]' must
be version 8.00.0858 or higher in order for compensation for errors to
be turned off for its subscription."
I am unsure if this is still setting the parameter at the publisher as
it doesn't indicate, when I run "sp_help [table name]" the property
"compensate_for_errors" does not appear anywhere, how can I check?
Regards,
Ben
On Jan 11, 1:30 am, "Paul Ibison" <Paul.Ibi...@.Pygmalion.Com> wrote:
> But the default for the compensate_for_errors parameter is true. Pls try
> setting it to false and see if this eliminates the problem.
> Cheers,
> Paul Ibison SQL Server MVP,www.replicationanswers.com.

Monday, February 20, 2012

Merge Replication and publisher deleting subscriber inserts.

The row was inserted at 'Subscriber Laptop' but could not be inserted at
'Publisher server'. INSERT statement conflicted with COLUMN FOREIGN KEY
constraint 'FK1'. The conflict occurred in database 'Tst', table 'Report',
column 'ReportNo'.
http://support.microsoft.com/default...b;en-us;307356
We are using Merge Replication. Sql Server 2000 SP4 on the server and MSDE
SP4 on the laptops.
We've been testing for a few months and just starting to trickle into
production. This is the first time we've seen this error. From what I could
google, the KB I refer to above says we should have NOT FOR REPLICATION on
all FK constraints.
Now, all of my hits on this subject seem to be 2003 and earlier. So before I
go ahead and make this huge change, I want to confirm that yes, infact, I
should be doing this.
Should NFR be put on Primary Keys as well?
Can this NFR be specified through VISIO as that is where we maintain the
data model. If not, is there an alter statement we can apply to constraints
to turn this option on?
Buzz.
NFR can't be put onto PKs but definitely you should have it on the FKs (see
http://www.replicationanswers.com/Me...derArticle.asp)
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)