IBM Support

TDToolkit truncate error on import from Microsoft SQL Server/ DB2 /double-byte languages

Question & Answer


Question

Why does the TDToolkit -import command produce the error "String or binary data would be truncated" when using Microsoft SQL or and Db2 databases, and double-byte languages?

Cause

Maximo databases for double-byte languages that were created with the Maxinst utility on version 6.2.1 or earlier or that were created with the Maxinst utility on version 6.2.2 or later and the recommended parameters were not used.

Answer

You use the VarcharMultiplier utility to multiply the default length of varchar columns in the database. You typically need to use the VarcharMultiplier utility to accommodate the version 7 translation process, particularly for double-byte languages. Run the VarcharMultiplier utility after upgrading the database so that you can import translated data (xliff files) without truncation errors.


The VarcharMultiplier utility is located in (default Windows) C:\IBM\SMP\maximo\tools\maximo\varcharmultiplier.bat (default UNIX) /opt/IBM/SMP/maximo/tools/maxim/ovarcharmultiplier.sh

The VarcharMultiplier utility applies only to Microsoft SQL Server and DB2 databases. It is not necessary for Oracle databases, which has the VARCHAR(2) data type.

Use of VarcharMultiplier is needed for databases that were created with the Maxinst utility on version 6.2.1 or earlier. It can also apply to databases that were created with the Maxinst utility on version 6.2.2 or later, if the recommended parameters were not used.

Maxinst for version 6.2.2 and later provides a "-m" parameter. If you specify a value for -m, it causes the native lengths of varchar columns to be a multiple of the length specified on maxattribute. For example, running Maxinst with a parameter of -m2 doubles the native lengths of varchar columns. With a parameter of -m2, if maxattribute has alphanumeric maxtype and length = 10, then the native column will have length = 20.

Databases that were created in 6.2.1 and earlier did not have the multiplier available.
You can use the VarcharMultiplier utility to apply the -m multiplier retroactively.

Microsoft SQL Server
For SQL Server, a parameter of -m2 is typically sufficient to expand column lengths for double-byte languages. If necessary, use a parameter of -m3 to triple column lengths.

IBM Db2
On Db2, the VarcharMultiplier utility might encounter issues because of Db2 index size restrictions. If you use the VarcharMultiplier with Db2, you should be on Db2version 9, which allows larger index sizes than Db2 version 8.
For Db2version 9, a parameter of -m3 is most likely to be successful.

Note: The preferred method for addressing column length for double-byte languages in Db2 is to use the Maxinst utility with the "-y" vargraphic parameter.
Maxinst for release 7.1 and later adds the -y parameter for Db2 databases. The -y parameter causes varchar columns to be created with a native datatype of vargraphic.
The -y vargraphic parameter is only available in the Maxinst utility. Maxinst is only used for creating new databases. It cannot be used for upgraded databases.
For Db2databases, you can specify either the -m parameter or the -y parameter. Do not specify both.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"Upgrade Utility","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.5;7.6;7.6.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
13 April 2021

UID

swg21306253