Commandline sync and scriptfile options

molnaramolnara Posts: 10
edited January 12, 2011 3:16AM in SQL Compare Previous Versions
Hello,

I am trying to setup a continuous integration using TFS Build. Problem is, the /scriptfile argument does not seem to work unless /sync is also specified. I need to generate an update script that I can run at a later time WITHOUT having the sqlcompare do a database synchronization.

The following command is an example of what I'm executing during my build:

sqlcompare /scr1:"C:\SchemaPath" /db2:DBName /s2:ServerName /ScriptFile:"C:\Update.sql" /IgnoreParserErrors /f

Using the above example will not generate a script file unless I also pass the /sync option.

I really hope that I have just over looked something and this is not by design. I really need to have scripts executed at a later time, NOT during the TFS Build.

Thanks in advance for any help.

-Adam

Comments

  • Ok, after spending hours on this, I finally noticed the sticky with the latest patch which specifically addresses my issue:
    Patch to Red Gate SQL Compare 8.50.25.20 - 26 November 2010
    ===================================================
    This build of SQL Compare should address the following issues in SQL Compare 8.50.12.18:

    SC-4896 /ScriptFile:"<path\name.sql>" does not appear to generate script file (regression from 8.2)
    SC-4903 GRANT WITH stops permission getting scripted.

    Now, it does generate the script BUT it seems to hang, unless I press enter, then it exits. :cry:
  • Could you post an example of your commandline with all the switches you're using so I can see if I can replicate the problem? If you prefer to contact us directly, please email support@red-gate.com quoting F0041797 in the subject line
    Systems Software Engineer

    Redgate Software

  • I have same issue. Just need diff file. Could some one tell a work around if exists.
  • isuruceanu wrote:
    I have same issue. Just need diff file. Could some one tell a work around if exists.

    Hi,

    If you're referring to the "hanging at the end" issue, then the latest patch build should sort that out. Can you download the latest release from the Cumulative Patch stickied thread and see if it helps?
    Systems Software Engineer

    Redgate Software

  • I'm referring to SC-4896 /ScriptFile:"<path\name.sql>" does not appear to generate script file (regression from 8.2)

    if I'm downloading patch from http://www.red-gate.com/messageboard/viewtopic.php?t=11077 will guaranty that his will work?
  • It should do, yes. The other user reported that it resolved the problem, and we've not had other occurrences of this in the new patch as yet.
    Systems Software Engineer

    Redgate Software

  • Yes I'm also confirming that this patch fixed the issue, Thanks for helping
  • No problem, thanks for letting us know!
    Systems Software Engineer

    Redgate Software

  • I have this problem. Using SQL Compare version 8.50.12.18.

    I'm using an XML arguments file that specifies snapshot1, snapshot2 and scriptfile. SQLCompare does not complain, but no script file is being generated.

    :(
  • DIF1891 wrote:
    I have this problem. Using SQL Compare version 8.50.12.18.

    I'm using an XML arguments file that specifies snapshot1, snapshot2 and scriptfile. SQLCompare does not complain, but no script file is being generated.

    :(

    If you check molnara's post above, you'll see this was fixed in the 8.50.25.20 version which is newer than the one you have. Please try the latest cumulative patch in the post here: http://www.red-gate.com/messageboard/vi ... hp?t=11077 to see if it helps out.
    Systems Software Engineer

    Redgate Software

  • DIF1891 wrote:
    I have this problem. Using SQL Compare version 8.50.12.18.

    I'm using an XML arguments file that specifies snapshot1, snapshot2 and scriptfile. SQLCompare does not complain, but no script file is being generated.

    :(

    If you check molnara's post above, you'll see this was fixed in the 8.50.25.20 version which is newer than the one you have. Please try the latest cumulative patch in the post here: http://www.red-gate.com/messageboard/vi ... hp?t=11077 to see if it helps out.
    James,

    I read the version wrong. I did as you suggested and it works fine now.

    Thanks!
Sign In or Register to comment.