SQL script created does not execute
CtrlAltDel
Posts: 4
I am having big problems getting the SQL script that SQL Compare 5 generates to execute from SQL Server Management Studio.
I have a baseline SQL2005 DB that I have created a snapshot of, and an empty SQL2005 DB on another server. If I do a compare and synchronise from within SQL Compare's GUI, then everything works just fine. If however, I save the SQL script that SQL Compare generates, and execute that from SQL Server Management Studio, the script dies most of the way through with various SQL errors (particularly 'Incorrect syntax near 'GO''). If I use the command line version to generate the SQL script, that dies with the same errors. If I use SQLCMD to run the SQL script, that dies with the same errors.
Any ideas what's going on? If it helps, I can email the complete script as generated by SQL Compare.
I have a baseline SQL2005 DB that I have created a snapshot of, and an empty SQL2005 DB on another server. If I do a compare and synchronise from within SQL Compare's GUI, then everything works just fine. If however, I save the SQL script that SQL Compare generates, and execute that from SQL Server Management Studio, the script dies most of the way through with various SQL errors (particularly 'Incorrect syntax near 'GO''). If I use the command line version to generate the SQL script, that dies with the same errors. If I use SQLCMD to run the SQL script, that dies with the same errors.
Any ideas what's going on? If it helps, I can email the complete script as generated by SQL Compare.
Comments
It would probably be a good idea to attach the SQL script to an email and send it to support@red-gate.com. Not all programs that run SQL can handle the GO batch keyword, but Management Studio should! I'd like to have a look at the script.
Thanks!
Thanks for the information. Maybe it would be a good idea if we respected non-MS-DOS text. I can't imagine it coming up too often, but it looks like it could potentially cause some problems.