IBM Support

UDA-SQL-0144 An arithmetic exception was detected.

Troubleshooting


Problem

When running the out of the box "Top Resource Utilization" report with hourly summarization for a period longer than 4 days, TCR fails with an arithmetic overflow error. If the report period is less than 4 days, report execution is performed fine.

Symptom

UDA-SQL-0114 The cursor supplied to the operation "sqlOpenResult" is inactive.
UDA-SQL-0144 An arithmetic exception was detected.
[IBM][CLIDriver][DB2/NT64] SQL0802N Arithmetic overflow or other arithmetic exception occurred. SQLSTATE=22003
RSV-SRV-0042 Traceback:RSReportService.cpp(779): QFException: CCL_CAUGHT:
RSReportService::process()RSReportServiceMethod.cpp(265): QFException:CCL_RETHROW:RSReportServiceMethod::process(): asynchWait_RequestRSASyncExecutionThread.cpp(788)

Cause

For SQLSTATE=22003 we can identify three possible explanations:
A) supplying invalid data types as function or procedure input parameters. For example supplying a LONG type when a simple INTEGER type is expected.
B) Database SQL limits have been exceeded. An example of this issue will occur when performing a count over a dataset that contains more rows than the MAX_LONGINT_INT SQL limit.
C) An aggregate of a measure column or a calculation exceeds the data type allocated to the column itself.

Considering that the error occurs only under specific circumstances (time range), likely we are in B or C scenarios.

This kind of error may be related to the historical data stored into TDW tables used by the report and retrieved by the SQL statement within report itself.

Diagnosing The Problem

It is possible that the report query is returning data that exceeds expected variable limits, so usually this may require further investigation to understand the involved query and look at returned data. Anyway, SQL0802N is essentially a warning and can be prevented by setting IGNOREWARNINGS=1 in db2cli.ini file of the DB2 client.

Resolving The Problem

1) Find and edit db2cli.ini file. This file would be in insqllib/cfg directory of the database instance running the CLI applications on UNIX(R) platforms.
2) In COMMON section, add IGNOREWARNINGS=1.
3) Recycle TCR. No need to restart DB2.
4) Run the report and verify the results.

[{"Product":{"code":"SSH2DF","label":"Tivoli Common Reporting"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"2.1;2.1.1;3.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

Tivoli Common Reporting V2.x

Document Information

Modified date:
30 January 2019

UID

swg21687153