This is a migrated thread and some comments may be shown as answers.

TNS name required for transactions with Oracle. Why?

1 Answer 50 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg
Top achievements
Rank 1
Greg asked on 06 Aug 2013, 08:48 AM
I'm getting the following exception when calling OpenAccess.FlushChanges() inside a TransactionScope using an Oracle backend:
You must use TNS names for participating in System.Transactions. Unable to
enlist a database connection in a System.Transactions.Transaction
   at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
   at OpenAccessRuntime.ExceptionWrapper.Throw()
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.handleException(Exception x, Boolean needsRollback)
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.flushRetainState()
   at OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.flush(Boolean retainValuesParam)
   at OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.flush(Boolean retainState)
   at OpenAccessRuntime.EnlistableObjectScope.FlushChanges(Boolean releaseMemory)
   at Telerik.OpenAccess.OpenAccessContextBase.FlushChanges(Boolean releaseMemory)
   at Telerik.OpenAccess.OpenAccessContextBase.FlushChanges()

It seems that this check is hardcoded in OracleFactory.Enlist just before delegating the enlistment to OracleConnection.EnlistTransaction. I've been using ODP.NET without TNS and with System.Transactions for ages and it doesn't require TNS names in the connection string. Why is this limitation in place?

1 Answer, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 06 Aug 2013, 02:05 PM
Hi Greg,

The check is based on limitations in very early version of the Oracle .NET driver. This limitation is no longer needed and will be removed in future versions of the product. 
You can workaround this by using EZCONNECT to connect to your Oracle database in case you want to avoid having an TNS setup. See this link for details. See the section 'EZCONNECT Setup'.

Thank you for bringing this to our attention and please accept my apologies for the inconvenience this might cause to you.
Do not hesitate to ask in case you have any other question.

Regards,
Ralph
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
Tags
Databases and Data Types
Asked by
Greg
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Share this question
or