Мы успешно использовали Oracle ManagedDataAccess 4.122.1.0 в течение длительного времени.После обновления до Oracle ManagedDataAccess 4.122.18.3 некоторые SQL-запросы работают отлично, но некоторые SQL-запросы постоянно запускаются, вызывая ошибку ORA-12537:
Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-12537: Network Session: End of file ---> OracleInternal.Network.NetworkException (0x000030F9): ORA-12537: Network Session: End of file
at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()
at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)
at OracleInternal.TTC.TTCExecuteSql.ReceiveExecuteResponse(Accessor[]& defineAccessors, Accessor[] bindAccessors, Boolean bHasReturningParams, SQLMetaData& sqlMetaData, SqlStatementType statementType, Int64 noOfRowsFetchedLastTime, Int32 noOfRowsToFetch, Int32& noOfRowsFetched, Int64& queryId, Int32 longFetchSize, Int64 initialLOBFetchSize, Int64[] scnFromExecution, Boolean bAllInputBinds, Int32 arrayBindCount, DataUnmarshaller& dataUnmarshaller, MarshalBindParameterValueHelper& marshalBindParamsHelper, Int64[]& rowsAffectedByArrayBind, Boolean bDefineDone, Boolean& bMoreThanOneRowAffectedByDmlWithRetClause, List`1& implicitRSList, Boolean bLOBArrayFetchRequired)
at Oracle.ManagedDataAccess.Client.OracleException.HandleError(OracleTraceLevel level, OracleTraceTag tag, OracleTraceClassName className, OracleTraceFuncName funcName, Exception ex, OracleLogicalTransaction oracleLogicalTransaction)
at OracleInternal.TTC.TTCExecuteSql.ReceiveExecuteResponse(Accessor[]& defineAccessors, Accessor[] bindAccessors, Boolean bHasReturningParams, SQLMetaData& sqlMetaData, SqlStatementType statementType, Int64 noOfRowsFetchedLastTime, Int32 noOfRowsToFetch, Int32& noOfRowsFetched, Int64& queryId, Int32 longFetchSize, Int64 initialLOBFetchSize, Int64[] scnFromExecution, Boolean bAllInputBinds, Int32 arrayBindCount, DataUnmarshaller& dataUnmarshaller, MarshalBindParameterValueHelper& marshalBindParamsHelper, Int64[]& rowsAffectedByArrayBind, Boolean bDefineDone, Boolean& bMoreThanOneRowAffectedByDmlWithRetClause, List`1& implicitRSList, Boolean bLOBArrayFetchRequired)
at OracleInternal.ServiceObjects.OracleDataReaderImpl.FetchMoreRows(Int32 noOfRowsToFetch, Boolean fillReader, Boolean returnPSTypes)
at Oracle.ManagedDataAccess.Client.OracleDataReader.Read()
at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies, IResultTransformer forcedResultTransformer)
at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies, IResultTransformer forcedResultTransformer)
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters, IResultTransformer forcedResultTransformer)
Пример такого запроса приведен ниже (он был создан NHibernate):
select
ID1_87_0_,
...
from
(
select
NODEENTITY0_.ID as ID1_87_0_,
...
from
NODES NODEENTITY0_
left outer join DIVISIONS DIVISIONEN1_
on NODEENTITY0_.IDDIV = DIVISIONEN1_.ID
left outer join CONTRACTS CONTRACTEN2_
on NODEENTITY0_.IDCONTRACT = CONTRACTEN2_.ID
left outer join ABONENTS ABONENTENT3_
on CONTRACTEN2_.IDABONENT = ABONENTENT3_.ID
left outer join WATERWAYS WATERWAYEN4_
on CONTRACTEN2_.IDWATERWAY = WATERWAYEN4_.ID
left outer join WARRANTY WARRANTYEN5_
on NODEENTITY0_.IDWARRANTYLAST = WARRANTYEN5_.ID
and NODEENTITY0_.IDDIV = WARRANTYEN5_.IDDIVISION
left outer join SERVICECENTER SERVICECEN6_
on WARRANTYEN5_.ID_SERVICECENTER = SERVICECEN6_.ID
left outer join PUS PUENTITY7_
on NODEENTITY0_.IDPULAST = PUENTITY7_.ID
left outer join TPPUS TPPUENTITY8_
on PUENTITY7_.IDTPPU = TPPUENTITY8_.ID
order by
NODEENTITY0_.ID asc
)
where
ROWNUM <= :P0;
Точно такой же SQL-запрос выполняется с Oracle ManagedDataAccess 4.122.1.0 без каких-либо ошибок.
Что мы делаем неправильно с Oracle ManagedDataAccess 4.122.18.3?
Технические подробности:
- ODAC не установлен
- .Net Framework - 4.7
- Версия NHibernate - 5.1.2
- База данных Oracle - 10,2