Posted: 23 Feb 2017 4:53 EST Last activity: 24 Feb 2017 6:34 EST
AES Upgrade 7.2 database issues
I am upgrading AES to level 7.2
When importing I'm asked to update the database.
One of the statements results in an error..
ALTER TABLE PEGA_DATA.pegaam_action_work ADD COLUMN "CURRENTWEEKKPI" DECIMAL (32, 9); ALTER TABLE PEGA_DATA.pegaam_action_work ADD COLUMN "LASTWEEKKPI" DECIMAL (32, 9);
Error: SQL0604N The length, precision, or scale attribute for column, distinct type, structured type, array type, attribute of structured type, routine, cast target type, type mapping, or global variable "DECIMAL (32, 9)" is not valid. SQLSTATE=42611 (State:42611, Native Code: FFFFFDA4)
In DB2 database server "Numeric" data type has a precision of 31, in other database servers like postgres and Oracle precision is more than 31.
Alter the DDL statements to match the precision of the target database and re-run the statements.
Best Practice: As a best practice, define the data type within 0-31 precision range, which will eliminate issue with other database servers, thus allowing the RAP or other operations within different database servers to be consistent.