May 18, 2026 at 9:33 pm
After upgrading 2 Merge Replicated databases to SQL 2022 and re-establishing the Merge Replication on the new environment, the synchronization is giving me the error message: "Error converting data type nvarchar to numeric. (Source: MSSQLServer, Error number: 8114)". The initial create of the Publication/Subscription failed silently because of some unusual network and cross domain restrictions, but we were able to fix it, but we fixed it without doing a full delete and recreate of the Merge Replication.
The SQL error log message is: "Replication-Replication Merge Subsystem: agent Publisher-P01-UserAppDB-UserAppDB-Subscriber-P02-5 failed. Error converting data type nvarchar to numeric."
In a trace I see: exec sys.sp_MSadd_merge_history90 @p1 output,5,6,N'Error converting data type nvarchar to numeric.',1,0,1,0,3,N'',0,0,0,0,0,0,0,0,326763,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,'1EF4CB2E-6498-4836-A600-0581DD789519',0
This was a side by side upgrade, and the Publication article properties say to drop the existing articles, so there shouldn't be any discrepancies between the tables. I've also run scripts to compare the articles between the Publisher and the Subscriber, and there are no datatype discrepancies.
My best "guess" is that this is actually an error internal to the sp_MSadd_merge_history90 stored procedure caused by artifacts from the initial setup and the solution will be to drop and recreate the replication, possibly restarting the 2 servers in between to ensure there are no artifacts hanging about.
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply