Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

Friday, March 30, 2012

Merge replication: View Conflicts interface errors

Hi,

Not sure if this is the correct place to post this but I'm doing merge replication between SQL Server 2005 SP1 and SQL Server Mobile 2005 (on mobile devices) and I'm having some problems with data conflict resolution in the "View Conflicts" interface on the server management studio. The "Select Conflict Table" comes up and there are 5 tables listed. When I click on any of these tables I get an error dialog box titled "Microsoft Replication Conflict Viewer" and message "[ColumnName] is neither a DataColumn nor a DataRelation for table summary (System.Data)" with details:

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

CSRTechnicianID 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()

It then opens the conflict viewer window, and lists a conflict in the top grid, but nothing in the lower grid (usually shows details of the winner and loser records). In the top grid it shows conflict type as "4(Update/Delete, Update wins)" and the conflict loser is the mobile device subscriber. If I click on anything (Submit Winner, Remove) I get an error message "Column [Column Name] does not belong to table summary (System.Data)" with details:

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

Column 'CSRTechnicianID' 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.btnSubmitWinner_Click(Object sender, EventArgs eg)

It seems that the conflict resolution function has gotten corrupted. Does anyone have any tips on how to fix this?

Regards,

Greg

Hi Greg,

This is a known issue which is now fixed in SQL Server 2000 SP2. Please try it and let us know if the problem persists.

The problem is that your table already had a roguid column which was named differently than what the conflict viewer was expecting.

sql

Monday, March 26, 2012

Merge replication throwing very weird error messages

I've been setting up subscriptions to a merge publication for the past 3 days. All of a sudden, I'm getting a pile of very strange errors. Replication is configured. I have 16 subscribers to an existing publication configured and synchronizing changes without any issues. The script that I'm using to create all of the subscriptions is as follows:

use [PIC]

exec sp_addmergesubscription @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.subscription_type = N'Push', @.sync_type = N'Automatic',

@.subscriber_type = N'Global', @.subscription_priority = 75, @.description = N'', @.use_interactive_resolver = N'False'

exec sp_addmergepushsubscription_agent @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.job_login = null, @.job_password = null, @.subscriber_security_mode = 1,

@.publisher_security_mode = 1, @.frequency_type = 64, @.frequency_interval = 0, @.frequency_relative_interval = 0,

@.frequency_recurrence_factor = 0, @.frequency_subday = 0, @.frequency_subday_interval = 0, @.active_start_time_of_day = 0,

@.active_end_time_of_day = 235959, @.active_start_date = 0, @.active_end_date = 0

GO

The last one that I added #17, gives the following errors after successfully creating the subscription.

Command attempted:

{call sys.sp_MSmergesubscribedb ('true', 0) }

Error messages:

The merge process could not initialize the subscription. Ensure that the subscription registration exists at the publisher, and reregister the subscription if necessary. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201011)
Get help: http://help/MSSQL_REPL-2147201011

RegCreateKeyEx() returned error 5, 'Access is denied.' (Source: MSSQLServer, Error number: 22002)
Get help: http://help/22002

Could not add article resolver 'Microsoft SQL Server Additive Conflict Resolver' information to the registry (Source: MSSQLServer, Error number: 21713)
Get help: http://help/21713

Could not register article resolver: 'Microsoft SQL Server Additive Conflict Resolver'. (Source: MSSQLServer, Error number: 21715)
Get help: http://help/21715

The system tables for merge replication could not be created successfully. (Source: MSSQLServer, Error number: 20008)
Get help: http://help/20008

I've tried to manually create it using the GUI and get an even stranger error message as follows:

TITLE: New Subscription Wizard

Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476


ADDITIONAL INFORMATION:

Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476


BUTTONS:

OK

I very obviously have replication installed by virtue of the fact that I have a publication and 16 subscriptions that are currently synchronizing. Any ideas?

Yes, I can connect to the subscriber from the server. That's how I created the subscription database in the first place, by connecting a query window to the subscriber and issuing a create database statement.|||

Is it the same account you are using to run this command as the other 16 subscriptions?

Did the sql server service account change between the success and this failure attempt?

Did you add sp_addmergesubscription_agent to those successful subscriptions too?

|||Same account was used to run these two commands for all of the other 16 subscriptions. No, the service account did not change. Yes, we successfully added sp_addmergesubscription_agent to the other 16.

Merge replication throwing very weird error messages

I've been setting up subscriptions to a merge publication for the past 3 days. All of a sudden, I'm getting a pile of very strange errors. Replication is configured. I have 16 subscribers to an existing publication configured and synchronizing changes without any issues. The script that I'm using to create all of the subscriptions is as follows:

use [PIC]

exec sp_addmergesubscription @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.subscription_type = N'Push', @.sync_type = N'Automatic',

@.subscriber_type = N'Global', @.subscription_priority = 75, @.description = N'', @.use_interactive_resolver = N'False'

exec sp_addmergepushsubscription_agent @.publication = N'PIC', @.subscriber = N'machinename\SQLEXPRESS',

@.subscriber_db = N'MyDatabase', @.job_login = null, @.job_password = null, @.subscriber_security_mode = 1,

@.publisher_security_mode = 1, @.frequency_type = 64, @.frequency_interval = 0, @.frequency_relative_interval = 0,

@.frequency_recurrence_factor = 0, @.frequency_subday = 0, @.frequency_subday_interval = 0, @.active_start_time_of_day = 0,

@.active_end_time_of_day = 235959, @.active_start_date = 0, @.active_end_date = 0

GO

The last one that I added #17, gives the following errors after successfully creating the subscription.

Command attempted:

{call sys.sp_MSmergesubscribedb ('true', 0) }

Error messages:

The merge process could not initialize the subscription. Ensure that the subscription registration exists at the publisher, and reregister the subscription if necessary. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201011)
Get help: http://help/MSSQL_REPL-2147201011

RegCreateKeyEx() returned error 5, 'Access is denied.' (Source: MSSQLServer, Error number: 22002)
Get help: http://help/22002

Could not add article resolver 'Microsoft SQL Server Additive Conflict Resolver' information to the registry (Source: MSSQLServer, Error number: 21713)
Get help: http://help/21713

Could not register article resolver: 'Microsoft SQL Server Additive Conflict Resolver'. (Source: MSSQLServer, Error number: 21715)
Get help: http://help/21715

The system tables for merge replication could not be created successfully. (Source: MSSQLServer, Error number: 20008)
Get help: http://help/20008

I've tried to manually create it using the GUI and get an even stranger error message as follows:

TITLE: New Subscription Wizard

Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476


ADDITIONAL INFORMATION:

Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476


BUTTONS:

OK

I very obviously have replication installed by virtue of the fact that I have a publication and 16 subscriptions that are currently synchronizing. Any ideas?

Yes, I can connect to the subscriber from the server. That's how I created the subscription database in the first place, by connecting a query window to the subscriber and issuing a create database statement.|||

Is it the same account you are using to run this command as the other 16 subscriptions?

Did the sql server service account change between the success and this failure attempt?

Did you add sp_addmergesubscription_agent to those successful subscriptions too?

|||Same account was used to run these two commands for all of the other 16 subscriptions. No, the service account did not change. Yes, we successfully added sp_addmergesubscription_agent to the other 16.

Wednesday, March 21, 2012

Merge replication problem

I am having a problem with sp_MSfetchidentityrange in a merge replication
with one subscriber.
The merge agent history shows the following 4 errors after executing the
last command: exec sp_MSfetchidentityrange N'Capacity_Type', 0
exec sp_MSadd_merge_history 32, 6, N'The merge process could not retrieve
identity range resource for table ''Capacity_Type''
and...
exec sp_MSadd_repl_error 2309, 0, 8, N'Merge Replication Provider',
'-2147200969', N'The merge process could not retrieve identity range resource
for table ''Capacity_Type''.'
and...
exec sp_MSadd_repl_error 2309, 0, 1, N'ABDN-SQL\OSLDB', '0', N'{call
sp_MSfetchidentityrange(?, 0) }'
and...
exec sp_MSadd_repl_error 2309, 0, 5, N'ABDN-SQL\OSLDB', '21195', N'A valid
identity range is not available. Check the data type of the identity column.'
The strange thing is that 12 other articles (before 'Capacity_Type) have
been replicated ok.
I.e. in a trace log you might see a run of successfull commands being
executed...
Step 1: exec sp_MSfetchidentityrange N'Thrusters', 0
Step 2: exec sp_MSfetchidentityrange N'Capacities', 0
Step 3: exec sp_MSfetchidentityrange N'Engines', 0
Step 4: exec sp_MSfetchidentityrange N'Towing', 0
Etc, etc
After I found this I thought I might try to remove the 'Capacity_type'
article from the publication.
I did this but then found the next article starting causing the exact same
errors as before.
E.g.
Step 2: exec sp_MSfetchidentityrange N'Area', 0
This leads me to believe it's not related specifically to any article.
Any help would be really appreciated as this is occuring on a production
server.
can you check for the existence of the following tables?
for merge -
distribution database on publisher - MSrepl_identity_range
publication and subscription database MSrepl_identity_range
for transactional -
distribution database on publisher - MSrepl_identity_range
publication database MSpub_identity_range
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
"Chris Winstone" <chris@.offshore-shipbrokers.co.uk(donotspam)> wrote in
message news:CDAB657D-303A-4F64-AAD8-CCAEFE523D37@.microsoft.com...
> I am having a problem with sp_MSfetchidentityrange in a merge replication
> with one subscriber.
> The merge agent history shows the following 4 errors after executing the
> last command: exec sp_MSfetchidentityrange N'Capacity_Type', 0
> exec sp_MSadd_merge_history 32, 6, N'The merge process could not retrieve
> identity range resource for table ''Capacity_Type''
> and...
> exec sp_MSadd_repl_error 2309, 0, 8, N'Merge Replication Provider',
> '-2147200969', N'The merge process could not retrieve identity range
resource
> for table ''Capacity_Type''.'
> and...
> exec sp_MSadd_repl_error 2309, 0, 1, N'ABDN-SQL\OSLDB', '0', N'{call
> sp_MSfetchidentityrange(?, 0) }'
> and...
> exec sp_MSadd_repl_error 2309, 0, 5, N'ABDN-SQL\OSLDB', '21195', N'A valid
> identity range is not available. Check the data type of the identity
column.'
> The strange thing is that 12 other articles (before 'Capacity_Type) have
> been replicated ok.
> I.e. in a trace log you might see a run of successfull commands being
> executed...
> Step 1: exec sp_MSfetchidentityrange N'Thrusters', 0
> Step 2: exec sp_MSfetchidentityrange N'Capacities', 0
> Step 3: exec sp_MSfetchidentityrange N'Engines', 0
> Step 4: exec sp_MSfetchidentityrange N'Towing', 0
> Etc, etc
> After I found this I thought I might try to remove the 'Capacity_type'
> article from the publication.
> I did this but then found the next article starting causing the exact same
> errors as before.
> E.g.
> Step 2: exec sp_MSfetchidentityrange N'Area', 0
> This leads me to believe it's not related specifically to any article.
> Any help would be really appreciated as this is occuring on a production
> server.
>
|||Hilary. Thanks for replying
There is MSrepl_identity_range on both the subscriber and publisher. There
is also a MSpub_identity_range table on the publisher. However I checked the
contents of all these tables and found that there was 82 records in
msrepl_identity_range on the publisher and only 3 records in
msrepl_identity_range on the subscriber. There are no records in
mspub_identity_range on the publisher.
Thanks
"Hilary Cotter" wrote:

> can you check for the existence of the following tables?
> for merge -
> distribution database on publisher - MSrepl_identity_range
> publication and subscription database MSrepl_identity_range
> for transactional -
> distribution database on publisher - MSrepl_identity_range
> publication database MSpub_identity_range
> --
> 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
> "Chris Winstone" <chris@.offshore-shipbrokers.co.uk(donotspam)> wrote in
> message news:CDAB657D-303A-4F64-AAD8-CCAEFE523D37@.microsoft.com...
> resource
> column.'
>
>
|||Hillary. I ended up removing replication and setting up my publications
again. But alas I'm having problems creating a publication from a script.
See later post.
Thanks anyway.
"Chris Winstone" <chris@.offshore-shipbrokers.co.uk(donotspam)> wrote in
message news:29CCA893-9E4B-4D9F-B18C-9210E8D910B5@.microsoft.com...[vbcol=seagreen]
> Hilary. Thanks for replying
> There is MSrepl_identity_range on both the subscriber and publisher. There
> is also a MSpub_identity_range table on the publisher. However I checked
> the
> contents of all these tables and found that there was 82 records in
> msrepl_identity_range on the publisher and only 3 records in
> msrepl_identity_range on the subscriber. There are no records in
> mspub_identity_range on the publisher.
> Thanks
> "Hilary Cotter" wrote:

Friday, March 9, 2012

Merge Replication Errors 18456 and 20028

Hello,
I am currently in the process of setting up merge replication and am
encountering some errors that I can not resolve. I hope that I am able to
provide enough information, however please ask for more detail if necessary.
While using the Replication wizard, my first error encountered was the 18456
- the original error message was sa login failed...while messing with the
remote login mapping the error changed to distributor_admin login failed. I
resolved this by using the sp_changedistributor_password and this then
allowed me to run through the wizard to set up the distributor. At this
point, I did not set up the publisher or publications or subscribers.
Ok, so now I can go into the confiuration screen and set up the publisher to
use the non-trusted SQL Server authentication using distributor_admin (also
tried sa). When I specify a merge publication and click ok (only trying one
table at this point) I get the 20028 error saying that the distributor is not
configured correctly.
In reading through multiple forums and asking questions, I'm told to use the
sp_dropserver dropping the logins in the process of course and then the
sp_addserver with the local param.
This has not resolved the issue...There are 3 servers right now in the
sysservers table. S13 is the local server name id=0, DALSQL is the
distributor with id=2 and repl_distributor with id=3.
Any suggestions or thoughts would be greatly appreciated!
Thanks in advance,
Brian
here's the output of the @.@.servername and the server name property along with
the records in the sysservers table...
SELECT @.@.SERVERNAME
SELECT CONVERT(char(20), SERVERPROPERTY('servername'))
SELECT * FROM SYSSERVERS
S13
S13
0 1089 S13 SQL Server SQLOLEDB S13 NULL NULL 2005-11-08 08:03:09.880 NULL
NULL NULL NULL 0 0 S13 0 1 0 0 0 0 1 0 0 0 1 0 NULL
1 1609 repl_distributor SQL Server SQLOLEDB S13 NULL NULL 2005-11-08
07:04:25.793 NULL NULL NULL NULL 0 0 S13 0 1 0 0 1 0 1 0 0 1 1 0 NULL
2 1089 ORDSQL01 SQL Server SQLOLEDB ORDSQL01 NULL NULL 2005-11-08
05:26:16.060 NULL NULL NULL NULL 0 0 ORDSQL01 0 1 0 0 0 0 1 0 0 0 1 0 NULL
3 1089 DALSQL01.SPAREBACKUP.COM SQL Server SQLOLEDB DALSQL01.SPAREBACKUP.COM
NULL NULL 2005-11-08 05:41:31.450 NULL NULL NULL NULL 0 0
DALSQL01.SPAREBACKUP.COM 0 1 0 0 0 0 1 0 0 0 1 0 NULL
"brianswestra" wrote:

> Hello,
> I am currently in the process of setting up merge replication and am
> encountering some errors that I can not resolve. I hope that I am able to
> provide enough information, however please ask for more detail if necessary.
> While using the Replication wizard, my first error encountered was the 18456
> - the original error message was sa login failed...while messing with the
> remote login mapping the error changed to distributor_admin login failed. I
> resolved this by using the sp_changedistributor_password and this then
> allowed me to run through the wizard to set up the distributor. At this
> point, I did not set up the publisher or publications or subscribers.
> Ok, so now I can go into the confiuration screen and set up the publisher to
> use the non-trusted SQL Server authentication using distributor_admin (also
> tried sa). When I specify a merge publication and click ok (only trying one
> table at this point) I get the 20028 error saying that the distributor is not
> configured correctly.
> In reading through multiple forums and asking questions, I'm told to use the
> sp_dropserver dropping the logins in the process of course and then the
> sp_addserver with the local param.
> This has not resolved the issue...There are 3 servers right now in the
> sysservers table. S13 is the local server name id=0, DALSQL is the
> distributor with id=2 and repl_distributor with id=3.
> Any suggestions or thoughts would be greatly appreciated!
> Thanks in advance,
> Brian
|||Here's the output I receive after disabling publishing and then enabling it.
From there I tried to configure publishing along with the publications and
subscriber. I am so lost and frustrated that I think if I can't resolve this
today then tomorrow morning I'm going to start an incident report with
Microsoft through my MSDN subscription option.
Here are the errors...
SQL Server Enterprise Manager could not enable 'ORDSQL01.SPAREBACKUP.COM as
a subscriber.
Error 14071: Could not find the Distributor or the distribution database for
the local server. The Distributor may not be installed, or the local server
may not be configured as a Publisher at the Distributor.
SQL Server Enterprise Manager could not enable database 'Affiliates' for
merge replication.
Error 20028: The Distributor has not been installed correctly. Could not
enable database for publishing. The Replication option of 'merge publish' of
database 'Affiliates' has been set to false.
**this error occurs for all databases in SEM**
SQL Server Enterprise Manager successfully enabled
'DALSQL01.SPAREBACKUP.COM' as the Distributor for 'DALSQL01.SPAREBACKUP.COM'.
S13
S13
01089S13SQL ServerSQLOLEDBS13NULLNULL2005-11-08
08:03:09.880NULLNULLNULLNULL00S13
010000100010NULL
11609repl_distributorSQL ServerSQLOLEDBS13NULLNULL2005-11-09
04:59:47.530NULLNULLNULLNULL00S13
010010100110NULL
21089ORDSQL01SQL ServerSQLOLEDBORDSQL01NULLNULL2005-11-08
05:26:16.060NULLNULLNULLNULL00ORDSQL01
010000100010NULL
31089DALSQL01.SPAREBACKUP.COMSQL
ServerSQLOLEDBDALSQL01.SPAREBACKUP.COMNULLNULL2005-11-08
05:41:31.450NULLNULLNULLNULL00DALSQL01.SPAREBACKUP.COM
010000100010NULL
"brianswestra" wrote:

> Hello,
> I am currently in the process of setting up merge replication and am
> encountering some errors that I can not resolve. I hope that I am able to
> provide enough information, however please ask for more detail if necessary.
> While using the Replication wizard, my first error encountered was the 18456
> - the original error message was sa login failed...while messing with the
> remote login mapping the error changed to distributor_admin login failed. I
> resolved this by using the sp_changedistributor_password and this then
> allowed me to run through the wizard to set up the distributor. At this
> point, I did not set up the publisher or publications or subscribers.
> Ok, so now I can go into the confiuration screen and set up the publisher to
> use the non-trusted SQL Server authentication using distributor_admin (also
> tried sa). When I specify a merge publication and click ok (only trying one
> table at this point) I get the 20028 error saying that the distributor is not
> configured correctly.
> In reading through multiple forums and asking questions, I'm told to use the
> sp_dropserver dropping the logins in the process of course and then the
> sp_addserver with the local param.
> This has not resolved the issue...There are 3 servers right now in the
> sysservers table. S13 is the local server name id=0, DALSQL is the
> distributor with id=2 and repl_distributor with id=3.
> Any suggestions or thoughts would be greatly appreciated!
> Thanks in advance,
> Brian

Wednesday, March 7, 2012

Merge Replication does not apply changes in original order!

Has anyone noticed that Merge Replication does not apply changes in original
order?
This causes foreign keys errors but I fixed that by making the foreign keys
'not for replication'.
It also causes unique index errors if I am manipulating the unique values in
an exact sequence - anyone have a solution to this one?
That's correct!
I'm not exactly sure what order it will apply the changes in however. But
what it does is gathers up the changes, figures out what to apply where, and
then applies it one by one. If there is a pk/fk/GodKnowsWhat violation in
the initial attempt, the modification goes into a queue and when the merge
agent has completed the initial pass, it will retry the failures another
time.
For the majority of the cases, this second (or third, forth, etc) retry will
succeed. Sometimes you need to bump up the generationsperbatch switches to
2000 for this to succeed.
Merge replication in SQL 2005 will apply changes which belong to related
tables together in the same batch boundary so you don't have to worry about
this anymore.
Also becareful that you don't enforce cascading updates and deletes for
replication as this can get you into trouble.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Jim Breffni" <Jim Breffni@.discussions.microsoft.com> wrote in message
news:F55EE9FB-7733-4EDD-8E2B-A439978D3924@.microsoft.com...
> Has anyone noticed that Merge Replication does not apply changes in
original
> order?
> This causes foreign keys errors but I fixed that by making the foreign
keys
> 'not for replication'.
> It also causes unique index errors if I am manipulating the unique values
in
> an exact sequence - anyone have a solution to this one?
|||Thanks Hilary - where do I set the checkSortOrder generationsperbatch switch?
Jim.
"Hilary Cotter" wrote:

> That's correct!
> I'm not exactly sure what order it will apply the changes in however. But
> what it does is gathers up the changes, figures out what to apply where, and
> then applies it one by one. If there is a pk/fk/GodKnowsWhat violation in
> the initial attempt, the modification goes into a queue and when the merge
> agent has completed the initial pass, it will retry the failures another
> time.
> For the majority of the cases, this second (or third, forth, etc) retry will
> succeed. Sometimes you need to bump up the generationsperbatch switches to
> 2000 for this to succeed.
> Merge replication in SQL 2005 will apply changes which belong to related
> tables together in the same batch boundary so you don't have to worry about
> this anymore.
> Also becareful that you don't enforce cascading updates and deletes for
> replication as this can get you into trouble.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> "Jim Breffni" <Jim Breffni@.discussions.microsoft.com> wrote in message
> news:F55EE9FB-7733-4EDD-8E2B-A439978D3924@.microsoft.com...
> original
> keys
> in
>
>
|||you don't. What you do is make the generationsperbatch switches very large
in hopes that the pk fk modifications will occur in the same batch.
You should set
MaxDownloadChanges
MaxUploadChanges
UploadGenerationsPerBatch
DownloadGenerationsPerBatch
UploadReadChangesPerBatch
DownloadReadChangesPerBatch
UploadWriteChangesPerBatch
DownloadWriteChangesPerBatch
to 2000


Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Jim Breffni" <JimBreffni@.discussions.microsoft.com> wrote in message
news:BD122CA6-5721-428B-8F1E-791E99CE1E72@.microsoft.com...
> Thanks Hilary - where do I set the checkSortOrder generationsperbatch
switch?[vbcol=seagreen]
>
> Jim.
>
> "Hilary Cotter" wrote:
But[vbcol=seagreen]
and[vbcol=seagreen]
in[vbcol=seagreen]
merge[vbcol=seagreen]
will[vbcol=seagreen]
to[vbcol=seagreen]
about[vbcol=seagreen]
values[vbcol=seagreen]