ORA-01453 exception

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
vifani
Posts: 17
Joined: Thu 05 Aug 2010 16:20

ORA-01453 exception

Post by vifani » Mon 17 Jan 2011 07:34

The steps to reproduce the issue are
1) Execute an insert statement using classic ADO.NET DbCommand and your provider. This command must fail due to duplicated primary key violation
2) Execute a delete operation using entity framework and your provider

You should obtain an ORA-01453 exception if the connection string has the option "Transaction Scope Local" = true. The issue occurs on Oracle 10.2.0.4.0, not on Oracle 11.2.0.1.0

I send you as attachment an example solution using the support form.
Please send me a feedback asap.

Thank you :)

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Tue 18 Jan 2011 17:11

Apparently, the problem is that connection pooling is enabled, and the invalid connection with which constraint violation occurred is returned from the pool for the SaveChanges() method.

To resolve the problem, please try setting the 'Validate Connection' connection string parameter to true. In this case, connections retrieved from the pool will be checked before being used.

vifani
Posts: 17
Joined: Thu 05 Aug 2010 16:20

Post by vifani » Wed 19 Jan 2011 07:33

Thank you StanislavK

Setting the "Validate Connection" connection string parameter to true solved the issue :)

Please, consider to set this parameter to true as default, because I think that current behaviour is an unexpected one. I think that if a connection become invalid, it should be recycled, and should not be allowed to reuse it.

Where can I find a list of all parameters available for the connection string? I check you documentation, but the OracleConnectionStringBuilder class doesn't have the "Validate Connection" parameter.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 19 Jan 2011 14:06

The 'Validate Connection' parameter is false by default, because enabling this option may slow down retrieving connections from the pool.

All available connection string parameters have corresponding properties in the OracleConnectionStringBuilder class.

Thank you for your report on the documentation, we will include the description of the 'Validate Connection' parameter in one of the nearest builds.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 21 Jan 2011 16:43

There was a problem with opening a transaction for a connection if an error occurred before on this connection. We have fixed this problem: now transactions should be started successfully in such situations.

We plan to release the build containing this fix in about a week. We will inform you when this build is available.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 27 Jan 2011 18:04

We have fixed the problem, the fix is available in the new 6.10.96 build of dotConnect for Oracle. This build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For the detailed information about the fixes and improvements available in dotConnect for Oracle 6.10.96, please refer to
http://www.devart.com/forums/viewtopic.php?t=20115

Post Reply