Windows Event Log: Arithmetic overflow error converting expression to data type int on TBLuser table

Version 1


    The following error can be found in the Windows Application Event Log of the RES Workspace Manager Relay Server:

    Source: RES ONE Workspace Relay Server
    Event ID: 0
    Task Category:  None
    Level: Error
    User: N/A
    Computer: FQDN_of_Relay_Server
    The description for Event ID 0 from source RES Workspace Manager Relay Server cannot be found.
    Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was included with the event:

    SqlError: UPDATE tblUser SET lngtimeopen = lngtimeopen + @TimeOpen, lngtimeactive = lngtimeactive + @TimeActive, lngkernel = lngkernel + @TimeKernel , lngtotalcpu = lngtotalcpu + @TotalCPU WHERE rowguid = @RowGUID  (@RowGUID=56b82c9c-eec3-442c-9b0a-19a2102003cf; @TimeOpen=2900; @TimeActive=0; @TimeKernel=1154; @TotalCPU=15541630)

    Connection: Server: FQDN_of_Relay_Server. Database: WorkspaceManagerLogs : Arithmetic overflow error converting expression to data type int.
    The statement has been terminated.

    Version: WorkspaceManager_Version (2016) CS:348333

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
    at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at RES.DataAccess.DbClient.BaseDbClient.TryExecute(BaseDbClient dbClient, IDbCommand dbCommand, Boolean handleException)



    Some columns in TBLuser are too small to handle large data.




    A new database created with RES ONE Workspace 2016 SR2 will solve this issue. 

    In case the Service Release is not (yet) available or in case the Service Release cannot be installed, a revision containing this update is available on request at RES Support.
    IMPORTANT: A revision contains multiple fixes. Only apply this revision when you are experiencing a specific problem. Unless you are severely impacted by this specific problem, RES Software recommends that you wait for the next service release containing these fixes.


    For an existing datastore the following SQL queries can be used to alter the table:

    alter table tblUser ALTER Column lngtimeopen bigint
    alter table tblUser ALTER Column lngTimeactive bigint
    alter table tblUser ALTER Column lngKernel bigint
    alter table tblUser ALTER Column lngUser bigint
    alter table tblUser ALTER Column lngTotalCPU bigint


    Make sure to create a backup of the database before making changes to the database tables layout.