Managed Oracle Client with Oracle Advanced Security Options

时间:2015-11-12 12:09:20

标签: .net oracle entity-framework-6 odp.net oracle12c

On October 14th, Oracle release the latest version of their Oracle Managed Client which was described to support Network Data Encryption.

http://www.oracle.com/technetwork/topics/dotnet/tech-info/odac12cr4ds-2704217.pdf https://www.nuget.org/packages/Oracle.ManagedDataAccess/

Although for some reason after trying multiple configuration, we still weren't able to get it to work. We keep getting the infamous ORA-12570: Network Session: Unexpected packet read error exception wrapped in The provider did not return a ProviderManifestToken string. The error in the alert log is the following TNS-12599: TNS:cryptographic checksum mismatch

We did confirm with the DBA that we were using the supported encryption algorithm.

At this point, my only additional settings are the following:

  <settings>
    <setting name="SQLNET.AUTHENTICATION_SERVICES" value="NTS" />
    <setting name="NAMES.DIRECTORY_PATH" value="LDAP,tnsnames" />
  </settings>

1 个答案:

答案 0 :(得分:5)

编辑:升级到ODP.NET托管12.2或更高版本。那里引入了对数据完整性算法的支持:https://docs.oracle.com/cd/E85694_01/ODPNT/featConnecting.htm#ODPNT8536

ODP.NET,托管驱动程序12.1及更早版本尚不支持数据完整性算法:

http://docs.oracle.com/cd/E63277_01/win.121/e63268/featConnecting.htm#CJAGFFCA

这会导致TNS-12599:TNS:数据库警报日志中的加密校验和不匹配错误,从而导致各种客户端错误,例如ORA-12570:网络会话:意外的数据包读取错误或ORA-12537:网络会话:文件结束。

如果您被迫使用ODP.NET托管版本12.1并且无法升级到12.2或更高版本,可以通过更改数据库端SQLNET.ORA参数来修复此问题,以便不需要校验和:

sqlnet.crypto_checksum_client = ACCEPTED

sqlnet.crypto_checksum_server = ACCEPTED