Identifier Name Length and Uniqueness

Oracle Database limit identifier names, such as table names, column names, and primary key names, to 128 bytes. Oracle Entity Framework Core will automatically truncate identifier names that are too long to this specified length, except for table names. This prevents both the user and Entity Framework Core from creating identifiers beyond the maximum character limit of the Oracle Database and receiving an "ORA-00972: IDENTIFIER IS TOO LONG" error” in most instances.

If the identifiers use multi-byte characters, the maximum identifier length may require a setting with character expansion ratio in mind to assure that all identifiers can be created in the Oracle database. For example, if the Oracle database character set is UTF8, a single character may require up to 4 bytes. Thus, to guarantee that all identifiers can be created in an Oracle database that does not support long identifiers, the RelationalAnnotationNames MaxIdentifierLength field can be set to 32 bytes (i.e. 128 bytes divided by 4). By default, Oracle EF Core MaxIdentifierLength has a value of 128.

Even if your EF Core model does not use identifier names longer than what your database version supports, you should consider setting MaxIdentifierLength to a lower value. ODP.NET and Entity Framework Core auto-generate schema object names from models. They may, on occasion, append additional characters to the names, which could exceed the maximum number of characters the database permits. By setting the MaxIdentifierLength, you prevent EF Core from causing the ORA-00972 error inadvertently.