What are the challenges you face when working across database platforms? Take the survey

saved script doesn't run

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited November 25, 2005 9:26AM in SQL Compare Previous Versions
Hi Mark,

Yes, SQL Compare saves its text in Unicode. This poses no problem for
standard programs like Query Analyzer or the command line equivilent, but if
you have written your own program to run the SQL in a non-Unicode
environment, the script could fail. A workaround in the meantime is to load
the SQL script into wordpad.exe and save it as plain text.


Brian Donahue

Red Gate Tecnhical Support

"MSudul" <msudul@oslersystems.com> wrote in message
> I just upgraded to of SQL Compare (Bundle). We use the saved
> difference scripts when we upgrade our products at customer sites. In this
> new version, the saved scripts appear different (unicode format perhaps)
> when we run them in the same way that we ran scripts saved using version
> 2.03, we get "L i n e 9 : I n c o r r e c t s y n t a x n e a r
> " . The scripts appear to have 2 characters for every one in the old
> (is this because of a unicode setting somewhere?). The only change I made
> was installing of SQL Compare.
> Mark


  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    The scripts produced by this version of SQL Compare also contained a UTF preamble, which means that programs that read the bytes of the script suddenly had to skip the first two bytes, as they would be interpreted as end-of-file characters.

    For backwards compatability, we'd introduced the WITHOUT PREAMBLE options in the save script dialogue of SQL Compare. We now have a choice of script formatting to save SQL Script in, including ASCII, UTF-8, and Unicode.
This discussion has been closed.