Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12570: Network Session: Unexpected packet read error

Subhash VermaMar 22 2016 — edited Mar 22 2016

Hi,

I am first time user for ODP.Net. I got to know that for Entity Framework, I need to connect database using managed opd dll.

So, i installed "ODTwithODAC121024(October, 2015 release)" on my machine. But when trying to connect to DB, I am getting "Unexpected packet read error".

I have seen many posts for the same error and mostly found two kind of responses.

1) This can be fixed by changing database side SQLNET.ORA parameters, such that checksums are not REQUIRED:

  1. sqlnet.crypto_checksum_client = ACCEPTED
  2. sqlnet.crypto_checksum_server = ACCEPTED

2) The issue is fixed in October, 2015 release. Though I am using the same. I have even tried through Visual studio Package manager console (Nugets).

I have been trying connecting DB using below 3 ways.

1) Add connection using server explorer

2) edmx file

3) connection string in *.config file and/or hard-coded connection string in code.

STACK TRACE:

IBatisNet.DataMapper.Exceptions.DataMapperException: Unable to open connection to "Oracle, oracle provider V4.121.2.0". ---> Oracle.ManagedDataAccess.Client.OracleException: ORA-12570: Network Session: Unexpected packet read error ---> OracleInternal.Network.NetworkException: ORA-12570: Network Session: Unexpected packet read error ---> OracleInternal.Network.NetworkException: ORA-12537: Network Session: End of file

Result StackTrace:

at OracleInternal.Network.ReaderStream.ReadIt(OraBuf OB, Int32 len)

   at OracleInternal.Network.ReaderStream.ReadwithCrypto(OraBuf OB)

--- End of inner exception stack trace ---

    at OracleInternal.Network.ReaderStream.ReadwithCrypto(OraBuf OB)

   at OracleInternal.Network.ReaderStream.Read(OraBuf OB)

   at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()

   at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)

   at OracleInternal.TTC.MarshallingEngine.UnmarshalUB1(Boolean bIgnoreData)

   at OracleInternal.TTC.TTCProtocolNegotiation.ReadResponse()

--- End of inner exception stack trace ---

    at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)

   at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)

   at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)

   at Oracle.ManagedDataAccess.Client.OracleConnection.Open()

   at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString)

--- End of inner exception stack trace ---

    at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString)

   at IBatisNet.DataMapper.SqlMapSession.OpenConnection()

   at IBatisNet.DataMapper.Commands.DbCommandDecorator.System.Data.IDbCommand.ExecuteReader()

   at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForList(RequestScope request, ISqlMapSession session, Object parameterObject, IList resultObject, RowDelegate rowDelegate)

   at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForList(ISqlMapSession session, Object parameterObject)

   at IBatisNet.DataMapper.SqlMapper.QueryForList(String statementName, Object parameterObject)

   at CFA.DataAccess.OracleDataController.RetrieveModel[TRetrieveModelType,TInputModelType](TRetrieveModelType retrieveModelValue, TInputModelType inputModelValue) in c:\scv\Code Base\Capital\1.22\Release-1.22.00-20151121\CFA\CFA.DataAccess\OracleDataController.cs:line 70

   at CFA.MainService.Controllers.CommonController.<GetDropDownValues>d__a.MoveNext() in c:\scv\Code Base\Capital\1.22\Release-1.22.00-20151121\CFA\CFA.MainService\Controllers\CommonController.cs:line 80

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

   at CFA.MainService.Tests.Controllers.CommonControllerTests.<The_GetDropDownValues_Action_Checks_Equal_When_The_Values_Match>d__7.MoveNext() in c:\scv\Code Base\Capital\1.22\Release-1.22.00-20151121\CFA\CFA.MainService.Tests\Controllers\CommonControllerTests.cs:line 65

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

I am using Visual studio 2013 and Oracle.ManagedDataAccess.dll (v4.121.2.0).

Kindly help and suggest If have to change sqlnet.ora parameters?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2016
Added on Mar 22 2016
1 comment
15,098 views