<-- Back

How to resolve ORA-02327: cannot create index on expression with data type LOB

Introduction

Oracle-based databases have a built-in limitation that an index cannot be placed on an attribute with an unsupported data type. These unsupported data types include variable-size array (VARRAY), nested table, abstract data type (ADT), large-object (LOB), or reference/object-relational (REF).

Environment

  • Applications hosted in Mendix on Kubernetes.
  • Applications hosted in On-Premises.

Instructions/Procedure

Within Oracle-based databases, a uniqueness constraint cannot be set on string attributes longer than two thousand characters. This is because a string attribute with more than two thousand characters is stored as a national character large-object (NCLOB). This is a variation of LOB, an unsupported data type, and as such cannot be used. If a uniqueness constraint is placed on a string attribute that is longer than two thousand characters, an ORA-02327 error can occur. To resolve this error, apply one of the following options:

  • Remove the uniqueness constraint on any string attributes longer than two thousand characters.
  • Limit the string attribute length to two thousand characters or fewer.

Outcome

The Oracle-based limitation is avoided, and the application runs as expected.

Internal information related

  • 293338
  • C0161BEMQ4B/p1796140272858159

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.