When publishing the T_ORGANIZATION BO (SQL Server 2012 back-end), an error was viewable from the publish notification in the Notifications portal section (it wasn’t apparent from looking at the BO in the Data Modeler that there was a problem).
ERROR: Could not change length of DB column, ‘CSTACCOUNTNUMBERTX’, for field: BoFieldImpl[name=cstAccountNumberTX,id=1366,Section=BoSectionImpl[name=General,id=BoSectionId[categoryId=1,subCategoryId=1],Business Object=BoImpl[name=Organization,id=103804,module=ModuleImpl[name=Organization,id=10]]]] Existing size: [DbColumnSize.DefaultSize[length=17]] Proposed new size: [DbColumnSize.DefaultSize[length=18]] Caused by: StatementCallback; SQL [
EXEC ALTER_TABLE_COLUMN ‘T_ORGANIZATION’, ‘ALTER COLUMN CSTACCOUNTNUMBERTX VARCHAR(20) COLLATE SQL_Latin1_General_CP1_CS_AS’
]; Arithmetic overflow error for data type tinyint, value = 299.; nested exception is java.sql.SQLException: Arithmetic overflow error for data type tinyint, value = 299.
Since the change was simply changing the length of text field from 17 to 20 characters, I wouldn’t expect any type of arithmetic overflow. I debugged the underlying stored procedure and found that the variable @index_id needed to be an INT rather than a TINYINT in [DROP_INDEXES_WITH_RESTORE_SQL], [GET_INDEX_COLUMNS], and [GET_INCLUDED_INDEX_COLUMNS].