Problems with TransactionScope and Oracle

后端 未结 6 1939
谎友^
谎友^ 2021-01-19 05:35

we have written a C# 3.5 client talking to an Oracle database (11g) using the ODP.NET.

This application has a batch process where a long running task is performed ma

6条回答
  •  有刺的猬
    2021-01-19 06:27

    although an old question, am hoping this answer helps... this especially happens for a long running transactions because the underlying IDbConnection does not remain open for longer duration and new connection is created for parts of transactionscope (connection pooling). it is for the same reason, the long transaction could succeed if the same open connection is returned and used else it fails. Only solution for this is to control connection creation and ensure that only one connection is used throughout.

提交回复
热议问题