Error with arguments on command line

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Error with arguments on command line

Postby philcart » Wed Sep 05, 2012 5:20 am

Executing the following on the command line.
Code: Select all
"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,
Code: Select all
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
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am

Postby David Atkinson » Wed Sep 05, 2012 10:52 am

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

Could you try again with this change and report back to this thread?
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby philcart » Thu Sep 06, 2012 8:56 am

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,
Code: Select all
/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
philcart
 
Posts: 32
Joined: Mon Aug 14, 2006 6:14 am

Postby David Atkinson » Thu Sep 06, 2012 10:19 am

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
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests