Red Gate forums :: View topic - Error with arguments on command line
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Error with arguments on command line

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Wed Sep 05, 2012 5:20 am    Post subject: Error with arguments on command line Reply with quote

Executing the following on the command line.
Code:
"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:
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
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1108

PostPosted: Wed Sep 05, 2012 10:52 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message Send e-mail
philcart



Joined: 14 Aug 2006
Posts: 32

PostPosted: Thu Sep 06, 2012 8:56 am    Post subject: Reply with quote

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:
/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 Laughing

Cheers
Phil
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1108

PostPosted: Thu Sep 06, 2012 10:19 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group