Friday, March 9, 2012

Merge replication fails

Hi all,
Finally snapshot is generated.
Then i create a pull subscription (i am using merge replication). But after executing 193 actions it gives following error
Line 1: Incorrect syntax near 'No_'

Details are as follow.

1. The subscription has been marked for reinitialization. Reinitialization will occur the next time you synchronize this subscription.

2. Category:SQLSERVER
Source: IM66\WM_MSDE
Number: 170
Message: Line 1: Incorrect syntax near 'No_'.

3. Category:NULL
Source: Merge Replication Provider
Number: -2147201001
Message: The process could not deliver the snapshot to the Subscriber.

4. Line 1: Incorrect syntax near 'No_'. The step failed.

Please Help.
Do i need to create a snapshot again? ( It takes almost 2-3 hours to create a snapshot of 995 articles).
Hi,

Is this SQL 2000 or SQL 2005?
Do you have any tables like %No_%?
Are there any special characters in this name?
Can you narrow down which table is it failing on?|||

It's SQL 2000.
There are lots many table having No_ as primary key.
Above history i have taken from Job History.
From where can i get the exact table name?

When i right click on merge agent and click on Error Details , i see following info.

Category Source Number
Data Source Subscriber Name 170
Agent Merge Replication Provider -2147201001

Please help.

|||995 articles is certainly a large publication. Are they all table articles, or are some of the stored procedures, views, functions, etc.?

I recomment you split this into two publications, one for just schema objects (stored procedures, views, functions, etc.) and one for table articles. This way if you change a stored procedure, it'll be much easier to propogate it to all the subscribers by reinit'ing just that one publication with schema objects, as opposed to a single publication with 995 objects.

and vice versa, if you need to reinit due to a change in a table article, then you don't have to spend valuable time regenerating bcp files, scripts, etc. for all 995 objects, just for that subset.|||

Can you query table MSmerge_history in distribution database and see if there are more details leading up to the failure? WHen applying the snapshot, it might tell you what file it's trying to apply. If you open that file, you may be able to see the TSQL that's failing.

If the history table doesn't tell you anything, can you change the -HistoryVerboseLevel from 1 to 2, as well as pipe the output of the merge agent to a file by using -Output "c:\somefilename.txt". If you open up your merge agent profile, you can add or modify these parameters. THen rerun the merge agent.

Is this SQL Server 2000 Sp4?

|||They are all table articles. I have not included schema objects yet.
Actually i am trying to implement replication for navision. I am using Microsoft Business Solution Navision (With sql option).

|||

I have SQL Server 2000 with Sp4.

On the distributor side there is no Msmerge_history, instead Msmerge_genhistory is there. I opened it but is contains data which gives information regarding snapshot generation.

Then i created a new merge agent profile. with -Historyverboselevel set to 2. where can i find -Output property. There is no such property in agent's profile.

Please help.

|||You have to add the parameter to the existing profile, or you can create your own custom profile. Just add -Output "<some file name>". If you still need help with this, please reference: http://msdn2.microsoft.com/en-us/library/ms221382.

No comments:

Post a Comment