.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Merge Replication - Subscription Error

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :

Hi All,


I get this error when I try to run the sync on a subscription. I found that this actually has something to do with permissions.

“ String or binary data would be truncated. [SQLSTATE 22001] (Error 8152). The step failed

If the account I am using is a server sysadmin does it still have to be part of the db_owner in publication and distribution dbs as shown below? It has write access to the file share as well so I am not sure I understand what the problem is? It is also a sysadmin on the client where the subscription is going?




View Complete Post

More Related Resource Links

Merge Replication: Fails using Replication.SaveProperties when changing Subscription Info

I'm trying to use SQL Server/Compact Framework 3 Merge Replication functionality and am running into a problem when calling Replication.SaveProperties (using c#). I was hoping to get some clarification on whether its my interpretation on how things should work vs a coding problem. Basically, the Merge Replication seems to work as I can sync information between my handheld and server databases.  However, I've created a form on my handheld so that the user can change some synchronication settings (e.g. Publication or Publisher Name) and then save it.  What I've noticed is : 1) You can NOT call Replication.SaveProperties until after a synchronization is performed (otherwise you get an error message).  Assuming this is so that it can create the "__sysMergeSubscriptions" table. Does this sound right? 2) If I then try to change the saved Subscriber information via another call to Replication.SaveProperties (e.g. change the Publication info), I then get an error message that says: The subscription was not found. Publisher, PublisherDatabase, or Publication  could be incorrect. Is this normal behavior?  Does this mean that you can you NOT change subscriber information; only add or drop it? Thanks,  Ed

Merge Replication, Push Subscription : The snapshot takes centuries to apply

Well, not centuries, except that the users are storming the gate. I'm trying to find how to get the snapshot moved to the subscriber and applied in a reasonable time. Last time was successful, but took 2 1/2 days to build the subscriber database from the snapshot. Hillary responded: Something is very wrong here. You should be able to generate your snapshot, copy it manually over to the subscriber - using the altsnapshotfolder parameter and then apply it there. So now I have my snapshot, a folder with lots of .cft .bcp .dri .prc .sch  and .trg files. Getting this to the subscriber computer shouldn't take long. Once I get it there, how do I use it to get the subscriber set up?  You can't be successful at this unless you're at least 1/2 a bubble off level.

error in merge replication

Hi ALL,      I have merge replication configured between republishers( sql 2008) and subscribers( sql 2000)...i am getting the following error while trying to sync   The merge process could not update the list of subscriptions. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201010) Get help: http://help/MSSQL_REPL-2147201010 Cannot insert duplicate key row in object 'dbo.sysmergesubscriptions' with unique index 'uc1sysmergesubscriptions'. (Source: MSSQLServer, Error number: 2601) Get help: http://help/2601 The subscription could not be created. (Source: MSSQLServer, Error number: 14057)   Any suggestions y i am getting this error TIA

Replication : Error: subscription already exists

I am receiving an error when i try to recreate a subscription. Error: subscription already exists. I ran expired subscription clean up job but still received this error. what am i missing?

Merge replication error

Hi ALL,  I have merge replication configured on sql server 2008. After two weeks snapshot agent ran again and when merge agent is running it throwing error you must rerun snapshot because current snapshot files are obsolete i dnt change anything on publication or snapshot folder location but still i am getting error   Any suggestion...TIA

Tx Replication Error when renaming Subscription Database

Tx Replication Errors when renaming Subscription Database. Please help. It seemed to work earlier, but now is giving errors when i rename subscription database.

How to view merge replication error (sql 2005)


We're using 2005 merge replication and we found that some records deletion cannot synchronize from publisher table to other subscriber table. (This table have very small size(<1000 records). We want to view those replication system tables or any logs for diagnostics this serious problem. Can you suggest any replication system table or logs that can indicate the reasons or hints of records deletion outsync?

Thanks and regards,

Merge Replication: Web Sync error 28011 with Basic Authentication on WinCE 6.0



I configured merge replication using SQL Server 2005 SP3 running on Windows Server 2008 R2 x64 with IIS 7.

My client is a .NET Compact 3.5 (RTM) application running on an embedded controller (Beckhoff CX1000) with Windows CE 6.0 installed. I am using SQL Compact 3.5 SP1 on the client. The preconfigured Win CE only had .NET Compact 2.0 installed, so I installed version 3.5 on the CompactFlash card attached to the controller.

Syncing over HTTP works perfecly using anonymous authentication.

I then executed the Web Sync Config Wizard and configured Basic Authentication without SSL. For authentication I use a local account even though my server is a member of our domain. The same account is used for access to the publication and distribution DBs (all located on the same server running IIS).

When I ran my client trying to sync, all I get is the 28011 error (Authentication failed).

The strange thing is that a test application on my desktop machine using .NET 3.5 (not Compact) can sync without problems. I even wrote a little test application for the embedded controller using the .NET HttpWebRequest object to connect to the server and I get the expected "Microsoft SQL Server Compact Server Agent" message.

I dug a little deeper into the issue and analyzed the HTTP packet getting sent to the server (using Wireshark). App

Mysterious Subscription - Merge Replication


Hi. I have SQL Server 2005 Standrad Editions publisher and 3 subscribers.

I had a publication with 3 subscriptions. For some reason i had to delete one of the subscription.

At the time of deletion for the first time on the publication server, it didnot return any errors.

Then when i tried to recreate it at the publisher, it gave me message that it already exists.

Now when i try to delete it at the publisher (both by seleting the check box to connect to subscriber n deleting or unchecking the check box), it fails saying there is no such subscriber.

I can go to the subscriber server, under replications and subscritpuions, i can delete it. But after few minutes or so, it shows up again automatically.

In replication monitor i donot see that particular subscription under the publication

In the Distribution database, i donot see the entry of the subscriber in MSmerge_subscriptions table

But in the database on which replication is taking place, i do see the jargon entries of the subscriber in the System table sysmergepublications.

When i delete those entries with delete statements, they show up again in the table after a few minutes.


I ran SQL server profiler to try and understand whats happening. My suspect is its something to do with the execution of the

Merge Replication - Error - Query processor ran out of stack space


Hello everyone,

I have a merge publication configured that has been running fine with no issues for many weeks.  Here is my setup... Publisher - SQL 2008 SP1, Distributor - SQL 2008 R2, Subscriber - SQL 2008 SP1.

On Wednesday and Thursday of last week, I created a few hundred foreign keys referencing a table (user information for auditing).  Then, on Friday evening, I started to receive this message:



Msg 8621, Level 17, State 1, Procedure MSmerge_sel_sp_18DB84E1A521483601D2A6D477F6483D, Line 85
The query processor ran out of stack space during query optimization. Please simplify the query.



I have traced it down, this command gets executed:


exec MSmerge_sel_sp_18DB84E1A521483601D2A6D477F6483D @maxschemaguidforarticle = 'F990B1EE-D52F-4DCA-8EEF-C1783DA47A0F', @type = 6


Which executes this:



Merge Replication Error...



Please find the error while merge replication at Pull type from Subscriptions...

Using SQL server 2008 r2

Subscriptions type:Pull Merge type

Briefing: We have created new table at publisher and trying to sync at Subscribers using pull Mege subscriptions, it got sync perfectly for rest of the systems but in one system i was having issue,,,,


2010-10-28 21:50:26.329 [26%] [0 sec remaining] Preparing table 'FullSheet' for merge replication
2010-10-28 21:50:46.923 [66%] [10 sec remaining] Bulk copying data into table 'sysmergesubsetfilters'
2010-10-28 21:50:48.267 The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify a
utput file to which to write.
2010-10-28 21:50:48.595 Category:NULL
Source: Merge Replication Provider
Number: -2147201001
Message: The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file t
hich to write.
2010-10-28 21:50:

SQL SErver 2008 Merge Replication: Alter Trigger cause syntax error on subscriber site


I have 2 clustered instances running on SQL Server 2008 SE-64 patch level 10.0.2531.0. These is one DB on these 2 instances (compatibility_level=80)under merge replication. now I need to change one trigger to add "NOT FOR REPLICATION". One publisher site all is ok but on subscriber site it causes Error 102 Severity 15 State 1 Incorrect Syntax near 'dbo'.

After tracing the error in profiler, I captured the incorrect syntax as below:

exec('ALTER TRIGGER [dbo].[trgBusinessEntityAllocationUpdate] on [dbo].[BusinessEntityAllocation] 

obviously, there is an duplicated part of object name. but the script was generated by replication engine. How could it happened? can anyone help?



George the DBA

SQL 2005 merge replication error


We have one customer that has two subscribers with the one distributor. there are three publications being merged. two of them are fine, but one publication is receiving an error:

The merge process was unable to access row metadata at the 'Subscriber'.

it seems to be from one table because the next error is for that table and to check the permissions. i know they are correct because i can access the table fine from SSMS.

Does anyone have any suggestions to start debugging this?



Merge Replication Error: "No key matching the described characteristics could be found within the cu

hi, I'm facing this error : "No key matching the described characteristics could be found within the current range" In replicaiton process between SQL Server 2008 SP1 and Client with SQL server compact 3.5 SP1. I found some information in other post : http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/67cbfa60-1cee-4a60-aacc-8c1c60c27467 http://social.msdn.microsoft.com/forums/en-us/sqlreplication/thread/66895DB2-A273-4193-8F68-D43736BF9227 and a hot fix : http://support.microsoft.com/kb/974068 But no one solved the issue. In SQL server i have a publication with 162 articles. Replication Monitor tell me that all is ok. But client log file indicate me the error. Last time we encountered the issue, we deleted the subscription and recreate it. But for me it is not a solution because we lost all history of the subscription. Thanks for any answer that you can give to me. Regards Julien

Merge Replication Error: "No key matching the described characteristics could be found within the cu

I am synchronising a SQL Compact Edition 3.5 Database against a SQL Server 2005 Server wirh Merge-Replication.
That worked fine for some time. Now I'm getting the following error message on the client machine after replicating some tables successfully:

No key matching the described characteristics could be found within the current range.|
   at System.Data.SqlServerCe.SqlCeReplication.EndSynchronize(IAsyncResult ar)
   at ITM.Base3.DB.SqlCe.SqlCeReplicationManager.SyncCompletedCallBack(IAsyncResult ar) in S:\...\DB\SqlCe\SqlCeReplicationManager.cs:line 272

On the webserver in "SQLCESALOG.TXT" I get:

2009/04/02 17:53:32 Thread=1578 RSCB=22 Command=FTCH Hr=00000000 ERR:Existing RSCB with same ExchangeID but different dwCommand 1
2009/04/02 17:53:32 Hr=80004005 ERR:REQUEST NOT QUEUED for ulRSCBId =  0
2009/04/02 17:53:33 Hr=80004005 ERR:No preceding Open command for command =  3
2009/04/02 17:53:33 Hr=80004005 ERR:REQUEST NOT QUEUED for ulRSCBId =  0
2009/04/02 17:53:34 Hr=80004005 ACK:Error for DistributorSessionID =  361
2009/04/02 17:53:34 Hr=80004005  0

The SQL Server tells me, that the synchronisation was OK.
I tried to reinitialize the subscriptions with no luck.
Sadly, this error messages are telling me nothing at all.

Any advises?
Thank you!

SQL Server 2008 R2 Merge error in Replication agents checkup job


We have a customer with three publications, one distributor/publisher and on subscriber using merge replication.

looking at the history of the job replication agents checkup, every entry shows a message of:

Executed as user: NT AUTHORITY\SYSTEM. The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active. [SQLSTATE 01000] (Message 20554).  The step succeeded.


Throughout the day this error still appears as this job runs every 10 minutes but replication works fine. The issue is at some point throughout the night the replication stops with that same message. Sometimes it stops at 6:00:00am, sometimes at 6:40:00am, others at 6:50:00am. All we have to do to fix it is go into the replication monitor and stop synchronizing and then start synchronizing and replication will run all day until it stops next morning - again.

What is causing that error message? I have checked the other logs and there is nothing running at those times. in addition, no one has logged into the server that early (they don't start arriving until 7:15 or later).

What can i do to correct the issue so the message stops happening.


merge replication Uninitialized subscription warning


I've followed the instructions to setup merge replication. Finally, when I viewed the "Launch Replication Monitor", it is showing the warning as "Uninitialized subscription" Doesn anyone know the cause of this warning? Also, the table is not getting update,,,,,

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend