Sql Compare 10 doesn't produce any errors

SaurinSaurin Posts: 5
edited January 28, 2014 9:25AM in SQL Compare Previous Versions
I have been using SQL Compare 10 recently upgraded from 8 to 10 version and I have found that 10 doesn't produce any errors.

Does anybody has same issue like me? Sql Compare 8 was producing errors each time unlike Sql Compare 10.

Further, I am using Command as shown below.

"d:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /server1:tcp:ServerName /database1:Database1 /makescripts:d:\Temp\Database1 /options:CaseSensitiveObjectDefinition /force

Comments

  • Saurin wrote:
    I have been using SQL Compare 10 recently upgraded from 8 to 10 version and I have found that 10 doesn't produce any errors.

    Does anybody has same issue like me? Sql Compare 8 was producing errors each time unlike Sql Compare 10.

    Further, I am using Command as shown below.

    "d:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /server1:tcp:ServerName /database1:Database1 /makescripts:d:\Temp\Database1 /options:CaseSensitiveObjectDefinition /force

    Please somebody helps. Thanks in advance.
  • Eddie DEddie D Posts: 1,805 Rose Gold 5
    Hi Saurin,

    thank you for your forum post.

    I suspect you mean doesn't produce any comparison results or create a scripts folder, am I correct?

    Please try adding the include switches to your syntax, based upon your command:
    "d:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /server1:tcp:ServerName /database1:Database1 /Include:Identical /Include:Missing /Include:Additional /makescripts:d:\Temp\Database1 /options:CaseSensitiveObjectDefinition /force
    

    Further information on the available switches in the command line can be found in this HELP article.

    Otherwise, please reply regarding the difference you have found between V8 and V10 of the SQL Compare Command Line.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Hi Eddie,

    It does produce comparing results or create scripts folder when database is available. Generally it shows OK response back from command line if scripts generated correctly.

    What if there is something going on at database side like database is not available because of restoring or something like network hiccup or database issue. SqlCompare should produce Error with cause.

    Sql compare 8 used to produce errors if it fails, but Sql compare 10 doesn't produce any errors even though database is not available.
    What I am expecting here is some kind of Errors as and when Sql scripts doesn't generate script folder. What I have noticed, it doesn't generate scripts folders and responded as OK instead of Error from command line.

    some of the errors shown below with Sql Compare 8

    Unexpected error: Specified cast is not valid.

    Error: Error occurred connecting to database:

    Unexpected error: Object reference not set to an instance of an object.
    Object reference not set to an instance of an object.
    System.NullReferenceException
    at o.u()
    at o.a(n )
    at RedGate.SQLCompare.Engine.Database.Register(ConnectionProperties connectionProperties, Options options)
    at o.a(LiveDatabaseSource )
    at o.a(Int32 )
    at o.a(String )
    at RedGate.SQLCompare.CommandLine.CommandProcessor.b()
    at RedGate.SQLCompare.CommandLine.CommandProcessor.Run()
    at RedGate.SQLCompare.CommandLine.Startup.a(String[] )



    I hope, It explains.

    Thanks,
    Saurin
  • Anybody can help on this?

    Thanks much in advance.

    -Saurin
  • Eddie DEddie D Posts: 1,805 Rose Gold 5
    Hi Saurin,

    Thank you for your reply. Sadly I am unable to replicate your fault symptoms.

    Using SQL Compare V10.4.8.87, I ran command line code to create a snapshot of a test database called GenerationX.

    To ensure that my syntax is OK, I ran my code which successfully created a snapshot file.

    To simulate failure, I took the test database off-line and repeated the command line code which generated an error indicating a log-in failure:
    SQL Compare Command Line V10.4.8.87
    ==============================================================================
    Copyright © Red Gate Software Ltd 1999-2013

    Unexpected error: Cannot open database "GenerationX" requested by the login. The

    login failed. Login failed for user 'domain\user'.
    Cannot open database "GenerationX" requested by the login. The login failed.
    Login failed for user 'domain\user'.
    System.Data.SqlClient.SqlException
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
    , Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
    ect stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
    dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
    ParserStateObject stateObj)
    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlis
    tOK)
    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
    serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire,
    SqlConnection owningObject)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host
    , String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject
    , SqlConnectionString connectionOptions, Int64 timerStart)
    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti
    on owningObject, SqlConnectionString connectionOptions, String newPassword, Bool
    ean redirectedUserInstance)
    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent
    ity identity, SqlConnectionString connectionOptions, Object providerInfo, String
    newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp
    tions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
    owningConnection)
    at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbC
    onnection owningConnection, DbConnectionPoolGroup poolGroup)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow
    ningConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou
    terConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at #namb.#n9G.#W8G(DataSource #ovUb, #en #5OPb, Boolean #q9rc)
    at #i9G.#n9G.#W8G(DataSource #ovUb, #en #5OPb, Boolean #q9rc)
    at #i9G.#n9G.#1tD(String #p9rc, DataSource #ovUb, #en #5OPb, Boolean #q9rc)
    at RedGate.SQLCompare.CommandLine.CommandProcessor.#lMPb()
    at RedGate.SQLCompare.CommandLine.CommandProcessor.#kcmb()
    at RedGate.SQLToolsCommandLine.CommandProcessor.#OUb()
    at #i9G.#OsPb.#6sc(String[] #ead)
    Next created a batch file and added the /LogLevel:Verbose switch which creates a log file. The log file generated contains the above information.

    Please try adding /LogLevel switch to your syntax so it becomes:
    "d:\Program Files (x86)\Red Gate\SQL Compare 10\SQLCompare.exe" /server1:tcp:ServerName /database1:Database1 /Include:Identical /Include:Missing /Include:Additional /makescripts:d:\Temp\Database1 /options:CaseSensitiveObjectDefinition /force  /LogLevel:Verbose
    

    Do you now see error messages and exit codes?

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.