IBM Support

The maximum key length is 900 bytes. The index 'EID_UNQ' has a maximum length of 2000 bytes

Troubleshooting


Problem

When I execute the Decision Warehouse database script 'trace_sqlserver.sql' for MS SQL Server, I get this message: "Warning! The maximum key length is 900 bytes. The index 'EID_UNQ' has maximum length of 2000 bytes. For some combination of large values, the insert/update operation will fail."

Symptom

When I execute the Decision Warehouse database script trace_sqlserver.sql for MS SQL Server, I get this message: :

"Warning! The maximum key length is 900 bytes. The index 'EID_UNQ' has maximum length of 2000 bytes. For some combination of large values, the insert/update operation will fail."

Cause

The unique constraint EID_UNQ is set with the EXECUTION_ID, and the maximum size of EXECUTION_I is 2000 bytes:

    EXECUTION_ID VARCHAR(2000) NOT NULL,
    ...
    CONSTRAINT EID_UNQ UNIQUE (EXECUTION_ID)

MS SQL Server limits the size of keys to 900 bytes.

Environment

Microsoft SQL Server

Resolving The Problem

It is safe to ignore the warning, but it is also possible to prevent it by changing the script so that the EXECUTION_ID maximum size is set to 900:

EXECUTION_ID VARCHAR(900) NOT NULL

In any case, because of this MS SQL Server limitation on the size of keys, the execution ID set on a rule execution request (see IlrSessionRequest.setExecutionId()) should be no longer than 900 characters. Practically, it is very unlikely that any Rule Execution Server client would need to set an execution ID of more than 900 characters.


Note: Starting in V8.5.1, the SQL script shows that change by default.

[{"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modules:Execution Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0;7.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
23 July 2021

UID

swg21635978