What are the challenges you face when working across database platforms? Take the survey
Options

SQL Compare Error when users exceed 32768

grantphgrantph Posts: 7
edited September 8, 2009 10:27AM in SQL Compare Previous Versions
I'm receiving an "Arithmetic overflow error for data type smallint, value = 32768" during the Registering Databases - Reading Permissions process on a large database.

Our database recently exceeded 32768 users (plus logins) which leads me to believe that SQL Compare is working on SQL Server 2000 principles of max 32767 users. My understanding is that this limitation was removed in SQL Server 2005 onward.

This error occurs in both SQL Compare 7.1 and 8.1

As a side note, SQL Compare 7.1 was running extraordinarily slow prior to this error when Mapping Users between databases which leads me to believe that the problems are related. (eg. with 30,000 users mapping could take 30 minutes on a fast CPU).

Can anyone confirm that this either a bug or limitation in SQL Compare 8?

I'm happy to provide further diagnostics if someone can provide info on how to enable them on SQL Compare 7 or 8.

Regards,

Grant P Henderson

Comments

  • Options
    Hi, thanks for the report - it looks like you've found something before anyone else. You're explanation sounds credible too. To get to the log file, click in the very, very top left, on the program icon where you have the option to open the log file. You also have the option there to set logging to verbose level which I recommend. Meanwhile I will verify with the product management team as to whether this is a bug (or a feature ;-).
  • Options
    Logfile extract follows:

    08:09:23.135|Info |SQL Compare Engine |7 |Populate Event Notifications start.
    08:09:23.135|Info |SQL Compare Engine |7 |Populate DDL Triggers start.
    08:09:23.135|Info |SQL Compare Engine |7 |Populate XML Schema Collections start.
    08:09:23.135|Info |SQL Compare Engine |7 |Populate Certs start.
    08:09:23.151|Info |SQL Compare Engine |7 |Populate SKeys start.
    08:09:23.151|Info |SQL Compare Engine |7 |Populate AKeys start.
    08:09:23.151|Info |SQL Compare Engine |7 |Populate Extended Properties start.
    08:09:23.182|Info |SQL Compare Engine |7 |Populate Permissions start.
    08:09:23.260|Error |SQL Compare UI |1 |Exception in progress dialog
    System.Data.SqlClient.SqlException: Arithmetic overflow error for data type smallint, value = 32768.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlDataReader.HasMoreRows()
    at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
    at System.Data.SqlClient.SqlDataReader.Read()
    at s.Read()
    at n.H()
    at n.F()
    at n.a(m )
    at RedGate.SQLCompare.Engine.Database.Register(ConnectionProperties connectionProperties, Options options)
    at ap.DoRegisterDatabaseForCompare(Database database, LiveDatabaseSource dataSource)
    at ap.DoRegisterDatabaseForCompare(Database database, DataSource dataSource)
    at ap.DoRegisterDatabase2ForCompare()
    at RedGate.Shared.Utils.ProgressTasks.ProgressTask.a()
    at RedGate.Shared.Controls.ProgressDialogEx.e()
  • Options
    Looks like we’re storing the number of users as a smallint and it’s not big enough for this. We'll have to log a bug and fix it in later version. (but I'll see if we can get a quick fix out...)
  • Options
    The bug reference for this is:

    SC-4529
  • Options
    Thanks. A quick fix would be appreciated as we currently can't migrate to our production database using SQL Compare.
  • Options
    I have to be honest- the signs of a "quick fix" are not looking great. I will try my best to get a "private build" out for you as this will be the quickest way of any. Please bear with me....
  • Options
    Thanks Chris. If I use "contact support" rather than the forums, will this speed up the process?
  • Options
    Its probably best to use the support channel now, yes- the call reference is F25572.
Sign In or Register to comment.