/scriptfile Error

brigzybrigzy Posts: 14
edited September 24, 2009 9:31AM in SQL Compare Previous Versions
SQLCompare 8.1.0.38

I have just purchased & downloaed the above version.

Here is my command line:
"C:\Program Files\Red Gate\SQL Compare 8\sqlcompare.exe" /Server1:Partner-Dev /Database1:rdb_partner_chall /Server2:Partner-Dev /db2:partner_chall
/scriptfile:"C:\test.sql" /force

Here is the output and Error:

C:\Program Files\SQL Release\SQL Scripts\SQL Scripts RDB>"C:\Program Files\Red G
ate\SQL Compare 8\sqlcompare.exe" /Server1:Partner-Dev /Database1:rdb_partner_ch
all /Server2:Partner-Dev /db2:partner_chall
SQL Compare Command Line V8.1.0.360
==============================================================================
Copyright © Red Gate Software Ltd 1999-2009

Serial Number: 507-001-109554-F1B5

Registering databases
Creating mappings
Comparing
Applying Command Line Items

Summary Information
===============================================================================
DB1 = Partner-Dev.rdb_partner_chall
DB2 = Partner-Dev.partner_chall

Object type Name DB1 DB2
StoredProcedure [dbo].[up_Net...SetRecent_MatterContactAgenda] <> <>


C:\Program Files\SQL Release\SQL Scripts\SQL Scripts RDB>/scriptfile:"C:\test.sql" /force
The filename, directory name, or volume label syntax is incorrect.
Richard

Comments

  • Hi,
    brigzy wrote:
    Here is my command line:
    "C:\Program Files\Red Gate\SQL Compare 8\sqlcompare.exe" /Server1:Partner-Dev /Database1:rdb_partner_chall /Server2:Partner-Dev /db2:partner_chall
    /scriptfile:"C:\test.sql" /force

    I think you have a line break between "partnet_chall" and "/scriptfile"; if you remove this and enter the whole command as a single line, it should work.

    Cheers,
    Rob
    Robert Chipperfield
    Red Gate
  • Robert wrote:
    Hi,
    brigzy wrote:
    Here is my command line:
    "C:\Program Files\Red Gate\SQL Compare 8\sqlcompare.exe" /Server1:Partner-Dev /Database1:rdb_partner_chall /Server2:Partner-Dev /db2:partner_chall
    /scriptfile:"C:\test.sql" /force

    I think you have a line break between "partnet_chall" and "/scriptfile"; if you remove this and enter the whole command as a single line, it should work.

    Cheers,
    Rob

    Thats it! great, thank you for fast response Rob
    Richard
  • Hi
    when running an SQL script generated by SQLCompare we get this error :

    1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> Msg 102, Level 15, State 1, Server PARTNER-DEV, Line 1
    Incorrect syntax near 'ï'.
    /*
    Run this script on:

    Partner-Dev.partner_chall - This database will be modified

    to synchronize it with:

    Partner-Dev.rdb_partner_chall

    You are recommended to back up your database before running this script

    Script created by SQL Compare version 8.1.0 from Red Gate Software Ltd at 24/09/2009 11:44:10

    */
    SET NUMERIC_ROUNDABORT OFF
    1> 2>


    OSQL seams to see some odd characters at the beginning of the file?
    Richard
  • brigzy wrote:
    Hi
    when running an SQL script generated by SQLCompare we get this error :

    1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> Msg 102, Level 15, State 1, Server PARTNER-DEV, Line 1
    Incorrect syntax near 'ï'.
    /*
    Run this script on:

    Partner-Dev.partner_chall - This database will be modified

    to synchronize it with:

    Partner-Dev.rdb_partner_chall

    You are recommended to back up your database before running this script

    Script created by SQL Compare version 8.1.0 from Red Gate Software Ltd at 24/09/2009 11:44:10

    */
    SET NUMERIC_ROUNDABORT OFF
    1> 2>


    OSQL seams to see some odd characters at the beginning of the file?

    I found I am ok if I use sqlcmd instead, which supports UTF-8.
    Richard
  • Good stuff - those characters at the front are almost certainly unicode byte order marks, in case you're interested!
    Robert Chipperfield
    Red Gate
  • You can switch to a different text encoding for your script to avoid the byte order marker problem - if you're just saving the script from a synchronization in the UI, the setting is in Application Options, accessible from the Tools menu.
    Software Developer
    Redgate Software
  • You can switch to a different text encoding for your script to avoid the byte order marker problem - if you're just saving the script from a synchronization in the UI, the setting is in Application Options, accessible from the Tools menu.

    I am new to SQLCompare just today, so I appologise if I miss the obvious...

    The script is being generated by SQLCompare (command line), so I am not sure the options you mention are available.

    Using SQLCMD as an alternative to OSQL is working solution for me.

    I do have a problem at the momentthough see : post
    http://www.red-gate.com/messageboard/viewtopic.php?t=9653
    Richard
  • /scriptencoding is the command line switch you're looking for - see the docs for more details.
    Software Developer
    Redgate Software
  • /scriptencoding is the command line switch you're looking for - see the docs for more details.
    Ah yes that would have done it..
    Many Thanks
    Richard
Sign In or Register to comment.