Saturday, October 1, 2022

Maximo varcharmultiplier batch file for upgrade or configdb process

What is varcharmultiplier ? 

  • varcharmultiplier is Out of the Box Maximo batch file.
  • It is used to increase the database column length by Maximo column length (MAXATTRIBUTE.LENGTH) multiplied by the input provided in -m parameter
  • This multiplier value will be stored in MAXVARS table for VARNAME = VARCHARMULTIPLE
  • It's applicable only for DB2 and Microsoft SQL Server databases because Oracle by default has VARCHAR(2) as the multiplier
Why varcharmultiplier is used ?

  • for translation process after upgrade of database, so that import of translated data in form of xliff files are loaded into Maximo without any truncation errors
  • to modify any column length of a table which has double-byte (Chinese, Korean, German etc) language description, without "data too long" error in description column during the insert process from XXBASETABLE to converted BASETABLE.
    •  for example, if you increase the decimal points of a column in WORKORDER table, Maximo will take backup of existing WORKORDER table into a new table XXWORKORDER , then it will modify the table definition of WORKORDER. Maximo will run the insert statements from XXWORKORDER to revised WORKORDER table. If the description column has any special characters, then we might get an error like "data too long to insert" on description column. varcharmultiplier is used to resolve the error by increasing the database length than Maximo UI column length.  

How to execute ? 
  •  This batch file is located in the Maximo Installed path: <WindowsDrive>\IBM\SMP\maximo\tools\maximo\varcharmultiplier.bat (Windows)  or /opt/IBM/SMP/maximo/tools/maximo/varcharmultiplier.sh (linux)
  • Stop the Servers
  • Navigate to this path and run varcharmultiplier.bat -m<Positive Number>. For example, varcharmultiplier -m2
  • Start the Servers
  • The log for the execution will be stored in the folder <WindowsDrive>\IBM\SMP\maximo\tools\maximo\log\VarcharMultiplierYYYYMMDDHHmmss.log or <Linux>/opt/IBM/SMP/maximo/tools/maximo/log/VarcharMultiplierYYYYMMDDHHmmss.log
  • In case, if you encounter any errors on the database while altering the column length, please check the string_units [SYSTEM or CODEUNITS32] configuration parameter setting.

Courtesy: Madhavan https://www.linkedin.com/in/madhavan-s-872b346/

Reference: https://www.ibm.com/support/pages/tdtoolkit-truncate-error-import-microsoft-sql-server-db2-double-byte-languages