Red Gate forums :: View topic - Sql Compare Exit Codes or ErrorLevel
Return to www.red-gate.com RSS Feed Available

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

Sql Compare Exit Codes or ErrorLevel

Search in SQL Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
paulbarbin



Joined: 18 Jun 2007
Posts: 6

PostPosted: Mon Jul 21, 2008 5:14 pm    Post subject: Sql Compare Exit Codes or ErrorLevel Reply with quote

I am using the command line version of SqlCompare (version 5!) and I'm looking for a list of the exit codes or DOS ErrorLevels to expect. I'm calling the compare from a DOS batch file and I want to know what codes will give me sucess vs failure.

I've seen reference to 63 being databases are equal, but I would have thought that would be error 0. I am currently getting an error 9009 and that happens when the db that we're comparing doesn't exist.

If I need to upgrade to 6 or 7 in order to get exit codes, I'd be willing.

Paul
Back to top
View user's profile Send private message
paulbarbin



Joined: 18 Jun 2007
Posts: 6

PostPosted: Mon Jul 21, 2008 5:19 pm    Post subject: DOS Exit Codes for SqlCompare 5 Reply with quote

Ok, ignore the error 9009 - that was because the batch couldn't find the sqlcompare exe. I ran sqlcompare /verbose /? and found the exit codes.

Exit Codes
==========
0 - Success.
1 - General error code.
3 - Illegal argument duplication. Some arguments may not appear more than once in a
command-line. If such arguments appear more than once this exit code will be returned.
8 - Unsatisfied argument dependency or violated exclusion when user runs command line. E.g.
/arg2 depends on /arg1 but you have specified /arg2 without specifying /arg1, or
alternatively /arg2 cannot be used with /arg1 but you have tried to use them both.
32 - Value out of range. Numeric value supplied for an argument that is outside the range of
valid values for that argument.
33 - Value overflow. The magnitude of a value supplied for an argument is too large and causes an overflow.
34 - Invalid value. The value supplied for an argument is invalid.
35 - No / invalid software license or trial period has expired.
63 - The databases being compared are identical with respect to any constraints on objects being
compared.
64 - General command-line usage error.
65 - Data error. Some input data required by the tool is invalid or corrupt.
69 - A resource or service required to run the tool is unavailable.
73 - Failed to create report
74 - IO error occurred. Generally returned if the program attempts to write to a file that
already exists without the user having specified the /force option.
77 - Action cannot be completed because the user does not have permission.
126 - Execution failed because of an error.
130 - Execution stopped because Ctrl+Break.
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 529
Location: Red Gate Software

PostPosted: Mon Jul 28, 2008 11:23 am    Post subject: Reply with quote

The /allowIdenticalDatabases option will tell the SQL Compare command line not to treat identical databases as an error condition, if you wanted that behaviour.
Back to top
View user's profile Send private message
paulbarbin



Joined: 18 Jun 2007
Posts: 6

PostPosted: Mon Aug 04, 2008 2:41 pm    Post subject: Reply with quote

Thanks Michelle. I've already coded around the problem in my batch file. But that is good to know.
Back to top
View user's profile Send private message
nigel.rutter



Joined: 25 Nov 2011
Posts: 3

PostPosted: Fri Nov 25, 2011 10:07 am    Post subject: Re: Reply with quote

Michelle Taylor wrote:
The /allowIdenticalDatabases option will tell the SQL Compare command line not to treat identical databases as an error condition, if you wanted that behaviour.

In newer versions (at least 8 ) of SqlCompare the /allowIdenticalDatabases option has been deprecated in favour of /include:identical.

Run the following to see extended help
sqlcompare /? /v
_________________
Nigel
Back to top
View user's profile Send private message
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