ORA-00972: identifier is too long

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Butzei
Posts: 12
Joined: Fri 26 May 2017 07:41

ORA-00972: identifier is too long

Post by Butzei » Tue 30 May 2017 09:10

Hi,

I have another problem while moving from NHibernate to DotConnect with EfCore. We have DotConnect 9.4.280 running against an existing Oracle 11g Database (Database First).

Now I have trouble with the length of the identifier generated by DocConnect.

Code: Select all

SELECT "vo".VisualControlId,
        "vo".messfolgeid,
        "vo".Series
FROM  TblVisControl"vo"
       inner join TblMeasurementSequence "vo.measurementsequence"
               ON "vo".MeasurementSequenceId= "vo.measurementsequence".MeasurementSequenceId
       inner join TblSequence "vo.measurementsequence.sequence"
               ON ( "vo.measurementsequence".TestId= "vo.measurementsequence.sequence".TestId) AND
                  ( "vo.measurementsequence".SequenceNumber = "vo.measurementsequence.sequence".Number)
WHERE  "vo.measurementsequence.sequence".SequenceId= :p__sequenceId_0
ORDER  BY "vo".Series
With a length of 31 characters "vo.measurementsequence.sequence" is too long for oracle.

To solve this issue I tried TruncateLongDefaultNames witch had no effect on the generated SQL query.

Code: Select all

            var config = OracleEntityProviderConfig.Instance;
            config.CodeFirstOptions.TruncateLongDefaultNames = true;
            config.CodeFirstOptions.UseNonLobStrings = true;
Did I miss any other configuration to shorten these identifieres?

Thanks,
Butzei

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: ORA-00972: identifier is too long

Post by Shalex » Wed 31 May 2017 16:38

Please upload a small test project with the corresponding DDL/DML script for reproducing to our ftp server (ftp://ftp.devart.com/, credentials: anonymous/anonymous ) or to any file exchange server so that we could download it from there.

powelerl
Posts: 31
Joined: Thu 22 Dec 2016 10:00

Re: ORA-00972: identifier is too long

Post by powelerl » Wed 31 May 2017 17:04

This could be a known EF Core issue.

https://github.com/aspnet/EntityFramework/issues/8255

Butzei
Posts: 12
Joined: Fri 26 May 2017 07:41

Re: ORA-00972: identifier is too long

Post by Butzei » Thu 01 Jun 2017 13:19

@Shalex: I uploaded a "Butzei_Devart.Demo.zip" containing a example solution to your server. Thank you for your investigations.

@powelerl: Thank you for your hint. I tried an upgrade to the mentioned EfCore 2 Preview 1 which doesn't work with dotconnect. Do you know any workaround or is the only chance to wait for a release of efcore and dotconnect solving this problem?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: ORA-00972: identifier is too long

Post by Shalex » Fri 02 Jun 2017 16:19

@powelerl: Thank you for the link.

@Butzei: Thank you for the project. The issue is exactly the same like described at https://github.com/aspnet/EntityFramework/issues/8255. The fix will be provided with EF Core 2 support. We are investigating the possibility to provide a fix for EF Core.

As a temporary workaround, please use shorter names.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: ORA-00972: identifier is too long

Post by Shalex » Mon 30 Oct 2017 19:22

Entity Framework Core 2.0 is supported: viewtopic.php?f=1&t=36128.

Be aware that starting from Entity Framework Core 2.0 the Scaffold-DbContext functionality (Devart.Data.Oracle.EFCore.Design.dll) is included in the Devart.Data.Oracle.EFCore package.

Post Reply