Identifier is too long - Oracle 12.2 Compatible to 12.1
Identifier is too long - Oracle 12.2 Compatible to 12.1
Dear DevArt Team,
I'm getting an exception ORA-00972: identifier is too long on Oracle 12.2 BUT compatible to 12.1. DevArt 9.6.540.
The generated queries by EF 6 have more than 30 characters assuming that the Oracle version is 12.2 but actually it doesn't have the features of 12.2 since compatible with 12.1.
Could you please investigate this?
Thanks in advance.
I'm getting an exception ORA-00972: identifier is too long on Oracle 12.2 BUT compatible to 12.1. DevArt 9.6.540.
The generated queries by EF 6 have more than 30 characters assuming that the Oracle version is 12.2 but actually it doesn't have the features of 12.2 since compatible with 12.1.
Could you please investigate this?
Thanks in advance.
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
1. Try setting this option in your code before the context usage (or in a static context constructor):
2. If this doesn't help:
a) specify the database object (table, column, index, foreign key, etc) which name exceeds the 128 bytes limit for identifiers in Oracle 12.2
b) the name itself that fails to be created
JIC: enable dbMonitor to trace the SQL statements sent to Oracle Server
Code: Select all
var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.CodeFirstOptions.TruncateLongDefaultNames = true;
a) specify the database object (table, column, index, foreign key, etc) which name exceeds the 128 bytes limit for identifiers in Oracle 12.2
b) the name itself that fails to be created
JIC: enable dbMonitor to trace the SQL statements sent to Oracle Server
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
Dear DevArt Team,
I come Back to this topic because I think we have the same Problem with a Orcale 19c DB.
When we connect to an Oracle 11g or 12c R1 DB tables are created as expected and Index and Foreign Key Names longer than 30 bytes are replaced with short names.
When connecting to a 19c DB set compatible to 12c R1 the default names are used exceeding the 30 bytes causing the ORA-00972.
I thing the components expect the name to be limited to 128 bytes because it is a 19c and do not consider the compatible setting.
The TruncateLongDefaultNames setting did not help in my tests. I was able to work around the problem by editing the created migrations. I assume that is what you recommended as option 2. But I'm not really happy with this solution because we wold have to do this with every coming migration.
Is there an other way to get the names shortened in newer Oracle DBs?
Thanks in advance for your help.
I come Back to this topic because I think we have the same Problem with a Orcale 19c DB.
When we connect to an Oracle 11g or 12c R1 DB tables are created as expected and Index and Foreign Key Names longer than 30 bytes are replaced with short names.
When connecting to a 19c DB set compatible to 12c R1 the default names are used exceeding the 30 bytes causing the ORA-00972.
I thing the components expect the name to be limited to 128 bytes because it is a 19c and do not consider the compatible setting.
The TruncateLongDefaultNames setting did not help in my tests. I was able to work around the problem by editing the created migrations. I assume that is what you recommended as option 2. But I'm not really happy with this solution because we wold have to do this with every coming migration.
Is there an other way to get the names shortened in newer Oracle DBs?
Thanks in advance for your help.
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
@vfel
The bug with using config.CodeFirstOptions.TruncateLongDefaultNames in EF Core is fixed in v9.4.280. We recommend using the newest build v9.9.887.
If this doesn't help, please specify:
1) the version of your Entity Framework (e.g.: EF Core 3)
2) the version of your dotConnect for Oracle (e.g.: 9.9.887)
The bug with using config.CodeFirstOptions.TruncateLongDefaultNames in EF Core is fixed in v9.4.280. We recommend using the newest build v9.9.887.
If this doesn't help, please specify:
1) the version of your Entity Framework (e.g.: EF Core 3)
2) the version of your dotConnect for Oracle (e.g.: 9.9.887)
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
Hi Shalex,
thanks for the quick reply.
we use dotConnect for Oracle in version 9.9.887 and EF Core 2.2.6 (our project is .Net Framework therefore we cannot update to EF Core 3.x).
The problem still seems to be present in this combination.
Let me know if I can provide any other information to localize this problem.
Veit
thanks for the quick reply.
we use dotConnect for Oracle in version 9.9.887 and EF Core 2.2.6 (our project is .Net Framework therefore we cannot update to EF Core 3.x).
The problem still seems to be present in this combination.
Let me know if I can provide any other information to localize this problem.
Veit
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
Thank you for your report. We will investigate the issue with config.CodeFirstOptions.TruncateLongDefaultNames in EF Core 2.2 and notify you about the result.
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
The new config.CodeFirstOptions.TruncateAllLongNames option (default value is False) is added to use EF Core 2/EF Core 3 implementation for truncating long names of columns and PK/FK/IX/UX. We will notify you when the new build is available for download.vfel wrote: ↑Fri 29 Nov 2019 15:29When we connect to an Oracle 11g or 12c R1 DB tables are created as expected and Index and Foreign Key Names longer than 30 bytes are replaced with short names.
When connecting to a 19c DB set compatible to 12c R1 the default names are used exceeding the 30 bytes causing the ORA-00972.
I thing the components expect the name to be limited to 128 bytes because it is a 19c and do not consider the compatible setting.
The TruncateLongDefaultNames setting did not help in my tests.
With the new build, you should set the following options in a static constructor of your context:
Code: Select all
var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.Workarounds.ProviderManifestToken = "Oracle, 11.2";
config.CodeFirstOptions.TruncateAllLongNames = true;
Re: Identifier is too long - Oracle 12.2 Compatible to 12.1
dotConnect for Oracle 9.10 is released: viewtopic.php?f=1&t=39716.