SQL Data Compare 8.1.0.4 generates script with syntax errors
scottdavidnelson
Posts: 3
I've had a few occurrences where SDC generates scripts (large scripts) with syntax errors in them. The syntax errors display after part of the script has executed.
E.g., after ~44,000 rows have been inserted, it displays this error:
Error occurred executing synchronization:
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
The variable name '@pv' has already been declared. Variable names must be unique within a query batch or stored procedure.
Incorrect syntax near '('.
is there a fix available for this issue?
E.g., after ~44,000 rows have been inserted, it displays this error:
Error occurred executing synchronization:
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
Incorrect syntax near 'GO'.
The variable name '@pv' has already been declared. Variable names must be unique within a query batch or stored procedure.
Incorrect syntax near '('.
is there a fix available for this issue?
Comments
I believe this issue only occurs when using the 'split transactions' option.
It should be fixed in the latest cumulative patch, found here
This fix isn't mentioned in the list of fixes, but that's only because it was originally reported as a SQL Packager problem. (SQL Packager uses the SQL Data Compare engine for the data part)
I had seen similar issues in previous version, usually recompare and resync worked after the initial failed attempt. This last time, I just used SQL's import wizard to copy the data, rather than retry via DC.
We've reproduced this issue in tests now, so we should have a fix fairly soon.
Could you please let us know if this fixes the problem?
Redgate Software