Cannot increase the max_length of a string field | Oracle Database


Extending the size limit on a long string field that is over 4097 characters causes discrepancies between the instance data dictionary and the Oracle database. When increasing the size of the data dictionary characters, the instance seems to process the change successfully. However, the label properties continue to display the previous string length, regardless of what the string dictionary shows. 

In Oracle, a field max size of 4,000 characters can be created as VARCHAR2 data type. If the max size needs to exceed 4000, the field is created as a CLOB data type, which has a limit of 4GB. Once a data type is set, the database-imposed limit cannot be exceeded for that data type, regardless of what the instance data dictionary shows.

For text fields that require exceeding 4,000 characters, it is critical that the field be set to the required size at the same time the field is created.

An Oracle data type change from VARCHAR2 to CLOB is not possible, because it is not simply an extension of a string data type. A new field must be created, or the size limits on the existing field must be taken into account.



Instances that rely on an Oracle database.



Users are not able to increase the max_length of a string field to anything greater than 4,000 characters in the application user interface (UI), because this requires the CLOB data type in Oracle. If a field must be larger than this, log an incident to request that a ServiceNow database administrator (DBA) make this change for you.


Related Links

Article Information

Last Updated:2019-06-27 06:52:38