Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2008 transactional replication 'Missing end comment mark '*/''

I'm trying to set up transactional replication on a Dynamics NAV database on SQL Server 2008 R2 SP1.

Using the same servers I have been able to set up replication successfully on a different DB.

I'm able to create the publication, subscription and the snapshot, but when I look in the event log I see the following error:

Replication-Replication Distribution Subsystem: agent [agent name] failed. Missing end comment mark '/'.*

Replication isn't working, and the replication monitor effectively hangs when interrogating this DB.

A Google search returns this page: MS Connect But I'm struggling to find where the system-generated stored procedure they refer to resides. I've tried hunting it down in the Profiler app with various filters, but not having much joy locating it.

Any help would be greatly appreciated!

like image 968
Loic Avatar asked Dec 13 '12 14:12

Loic


1 Answers

I notice that Martin's comment (also the most upvoted) solves the problem, as acknowledged by Loic. All credits due to Martin.

From the connect item it looks as though the failure occurs when you have a stored procedure with GO inside a comment. I guess you can find it with SELECT * FROM sys.sql_modules where definition LIKE '%/%GO%/%' then change the comment. – Martin Smith Dec 13 '12 at 15:11

Thanks, Martin. This seems to have done the trick! – Loic Dec 20 '12 at 8:56

like image 122
2 revs Avatar answered Sep 27 '22 18:09

2 revs