ALM Upgrade Error: ORA-12899: value too large for column during project upgrade

  • KM03644720
  • 25-May-2020
  • 25-May-2020

Summary

The column value exceeds the column size when Oracle is the database used

Error

Exception occurred. Message: [Mercury][Oracle JDBC Driver][Oracle]ORA-12899: value too large for column "<schema_Name>"."TEST"."TS_NAME" (actual: 257, maximum: 255) Failed SQL: /* ~~QC */ ...

Cause

Its likely caused by some 2-byte characters in the field

 

Fix

Corrective Procedure:

Step 1) If the error "ORA-12899" has already occurred during upgrade restore a backup of the project schema

Step 2) Issue the query:

     ALTER SYSTEM SET NLS_LENGTH_SEMANTICS=CHAR scope=spfile

Step 2) Stop ALM service and restart the Oracle instance

Step 3) Once Oracle is back online start ALM service

Step 4) Issue the following to the project schema…

     drop index <schema>.TS_Subject_name_idx;

     alter table <schema>.test modify (ts_name varchar2(255 char));

     CREATE UNIQUE INDEX <schema>.TS_SUBJECT_NAME_IDX ON <schema>.TEST (TS_SUBJECT, LOWER(TS_NAME));

     commit;

Step 5) Verify, Repair, then Upgrade the project