Compare to Script Folder not finding Stored Procedure

DaveSDaveS Posts: 6
I'm using Pro. I'm comparing a script folder between a live database. All the objects show up in the compare except one stored procedure in the script folder. The stored procedure has a Service Broker dialog command in it. The command looks like this:
FROM SERVICE [//Audit/DataSender]
TO SERVICE '//Audit/DataWriter', @MADBGUID
ON CONTRACT [//Audit/Contract]

When I remove this command from the stored procedure, the compare recognizes the stored procedure and it shows up in the compare. If I add the command back, the proc doesn't show up in the compare again. Does SQL Compare work with Service Broker commands in stored procedures?


  • Options
    I'm afraid the parser currently doesn't accept this syntax - the problem is the @MADBGUID variable name in the TO SERVICE command, and SQL Compare just ignores any files in the script folder that don't parse correctly. I've filed a bug about this (SC-3786) to be fixed for v7. As a workaround in the meantime, you could replace the @MADBGUID variable with its contents as a quoted string, which the parser in v6.2 will accept.

    Thanks for the bug report

  • Options
    I also have a problem with SQL Compare 6.2 occasionally ignoring files when comparing scripts to a live database. This behavior is misleading -- it implies that the script is no longer present in one's source control, possibly prompting one to drop the object from the live database. I submit that the tool should provide a warning (specifying the files in question) when it encounters .SQL files that it cannot parse. Simply ignoring files is a dangerous oversight. Would it be possible to provide an applet that reports on these files until it can be added directly to a version of SQL Compare? If helpful, I can provide some stored procedures currently ignored.
Sign In or Register to comment.