ITCM SQL Bridge: Arithmetic overflow error when bridging (synchronizing) from ITCM to APM.

Document ID : KB000109339
Last Modified Date : 03/08/2018
Show Technical Document Details
Issue:
This document describes a specific problem and solution related to a SQL bridge (database synchronization) error between ITCM and APM.  The following error messages (or similar) will be found in the ITCM Engine log, for the engine running the synchronization task:
NOTIFY | Error Message: ADO Version 10.0 - ExecuteCommandPointer -COM Error: ErrorCode:-2147217833,WordErrorCode:3159, IDispatch error #3159, Arithmetic overflow error for type int, value = 4294406144.000000., Microsoft SQL Server Native Client 11.0, (null) 
ERROR | cReplicationJob::DoTableUpdateInsertRow failed to execture db command pointer 
ERROR | GetActionOnError: MS SQL dbErrCat=-3, dbDetailedError=-1, errorInfo=ADO Version 10.0 - ExecuteCommandPointer -COM Error: ErrorCode:-2147217833,WordErrorCode:3159, IDispatch error #3159, Arithmetic overflow error for type int, value = 4294406144.000000., Microsoft SQL Server Native Client 11.0, (null) 
ERROR | SetIntermediateStatus1: Sync: Connection to Enterprise Database lost - Job aborted 
ERROR | DoTableUpdate - Failed to Update, sql=[insert into ca_agent_prop (object_uuid,domain_uuid,creation_user,creation_date,last_update_user,last_update_date,genModel,lockGenModel,genType,lockGenType,genTotMemory,lockGenTotMemory,genNumProcs,lockGenNumProcs,genRegAsset,lockGenRegAsset,genNetName,lockGenNetName,genNetIP,lockGenNetIP,genOS,lockGenOS,genProcType,lockGenProcType,genProcSpeed,lockGenProcSpeed,genTotDisk,lockGenTotDisk,genBatchID,lockGenBatchID,ndIP,lockNdIP,ndMAC,lockNdMAC,ndSwName,lockNdSwName,ndPortName,lockNdPortName,ndPortType,lockNdPortType,ndPortDesc,lockNdPortDesc,ndSwIP,lockNdSwIP,ndSwLoc,lockNdSwLoc,ndSwVendor,lockNdSwVendor,ndSwSite,lockNdSwSite,ndSwCust,lockNdSwCust,ndSwFn,lockNdSwFn,ndSwScDate,lockNdSwScDate) values (?,?,?,1532389357,?,1532389357,?,NULL,?,NULL,4294406144.000000,NULL,4294406144.000000,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,0,NULL,80524345344.000000,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL,?,NULL)]

The key message is:
ERROR | GetActionOnError: MS SQL dbErrCat=-3, dbDetailedError=-1, errorInfo=ADO Version 10.0 - ExecuteCommandPointer -COM Error: ErrorCode:-2147217833,WordErrorCode:3159, IDispatch error #3159, Arithmetic overflow error for type int, value = 4294406144.000000., Microsoft SQL Server Native Client 11.0, (null)

More specifically:
"Arithmetic overflow error for type int"
Environment:
Client Automation (ITCM) -- any version.
Cause:
The root cause is a difference between the schema for the MDB database, between ITCM and APM.  The ITCM database stores particular columns of the ca_agent_prop table using "float" or floating point numbers.  Whereas the same column, in the same table, in the APM MDB database, is storing "int" or integer values, which are unable to hold the value being synchronized across the bridge.
Resolution:
Inside of the ITCM media is this mdb installer: 
..\WindowsProductFiles_x86\mdb\setup.bat 

The solution is to run setup.bat, which will launch a java-based graphical installer for the ITCM mdb, and provide the connection details for the remote APM mdb. 

The installer will analyze the schema of the ITCM tables, and make updates as necessary, to ensure the ITCM tables within the APM mdb, are on the exact same schema as the ITCM tables on the source database. 

Note: It cannot hurt to run the mdb installer multiple times, if you are unsure this step was done. This step is necessary to ensure the SQL bridge has a matching table schema between source and target mdb tables for ITCM.