Running project from CMD "unexpected char: '\\'

Packages and compresses schema and contents of SQL Server databases

Moderators: JonathanWatts, Chris Auckland, David Atkinson, david connell, Anu Deshpande, Michelle Taylor, james.billings, Marianne

Running project from CMD "unexpected char: '\\'

Postby tspeich » Mon Mar 07, 2011 5:18 pm

I have an automated build project that packages a script created previously by RedGate Compare. Over the weekend the tools in mention where upgraded to Packager 6.4 Compare to 8.5. This morning my build is failing with the error message "unexpected char: '\\' " I am calling a project file from the cmd line with this call

C:\\Downloads\\Sql Packager 6>sqlpackager.exe/Project:"C:\\RedGate\\DSIDB_ALL.sqlpkg"

This same call has been working without incident for several months. I can also execute the package over the same script from the GUI and everything works fine. Any calls from the cmd line produce the error.
tspeich
 
Posts: 10
Joined: Tue May 04, 2010 5:40 pm

Postby tspeich » Tue Mar 08, 2011 6:07 pm

The error is coming from the result of a script being appended to the end of the upgrade script created by SQLCompare via the type command in a .cmd file.

There was no carriage return after a GO which was resuling in the code below

Code: Select all
GO/*
10 lines of vaious comments that included the \\ character
*/


Adding the carriage return solved the problem. Although there are other issues with sqlCompare that have caused problems since upgrading. My superiors have created an incident for those
tspeich
 
Posts: 10
Joined: Tue May 04, 2010 5:40 pm


Return to SQL Packager 6

Who is online

Users browsing this forum: No registered users and 0 guests