Unable to import rap file in DB2 server with double property
Create a property in a class and mark the property type as double.
Now optimize this column for reporting in a postgres server. Note that it creates the column with datatype as numeric(38,9). Now take a rap containing this property and class and try to import this rap in a DB2 server. This gives an error
Log file Error : DB2 SQL Error: SQLCODE=-604, SQLSTATE=42611, SQLERRMC=DECIMAL (38, 9), DRIVER=4.16.53 is the error obtained while importing on a db2 server
Steps to Reproduce
1. Create a property with Data type as Double in PRPC.
2. Optimize the property for reporting.
3. Create a RAP from the environment in which property has been optimized for reporting with Database as Postgres.
4. Import RAP in DB2 database server.
In DB2 database server "Numeric" data type has a precison of 31, in other database servers like postgres and Oracle precision is more than 31.
When a Rule-Admin-Product (RAP) is generated from database servers which has more precision that the target database server, there would be a mismatch, which causes the RAP import to abort due to an error.
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.
0% found this useful