Error with arguments on command line

philcartphilcart Posts: 45
edited September 6, 2012 5:19AM in SQL Compare Previous Versions
Executing the following on the command line.
"C:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /scripts1:"C:\Temp\7000\SQL\" /server2:MyServer\instance /database2:mydatabase /include:Different /include:Missing /include:StoredProcedure:[MyStoredProcedure] /options:DecryptPost2KEncryptedObjects,IgnoreFillFactor,IgnoreWhiteSpace,IncludeDependencies,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName,IgnorePermissions,IgnoreUsersPermissionsAndRoleMemberships /scriptfile:"C:\Temp\7000\7000.sql" /force /sync

Resulting output is,
SQL Compare: activated, edition: professional, serial number: xxx-xxx-xxxxxx-xxxx
Automation License: in trial, expires 18/09/2012 3:33:48 AM
SQL Compare Command Line V10.2.0.1337
==============================================================================
Copyright © Red Gate Software Ltd 1999-2012

Error: You must specify one of the following argument(s): /project, /database2,
/backup2, /scripts2, /makescripts, /sourcecontrol2, /snapshot2, /makesnapshot

Have gone over the command backwards, forwards and can't see where the error is. Can anyone tell me what I'm missing?


Cheers
Phil

Comments

  • I haven't tried your command but my instinct is that you will need to escape out the '' as '\'.

    Could you try again with this change and report back to this thread?
    David Atkinson
    Product Manager
    Redgate Software
  • Thanks for the response David. Unfortunately that didn't help at all and I wasted another few hours on this today before working out what the problem was.

    The problem has nothing to do with any of the switches mentioned in the error message, or the square brackets,
    /scripts1:"C:\Temp\7000\SQL\"
    

    The path shouldn't have a trailing "\". Once I removed the trailing "\" the command worked without any problems.

    I suppose it would be too much to ask that we get a useful error message rather than the red herring :lol:

    Cheers
    Phil
  • Apologies for this. This is something we should fix. We've raised issue SC-6029 in our bug tracking system.

    Thanks for bringing it to our attention.

    David
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.