Ibatis.net no client connected to Oracle -ODP.net (ODAC) Configuration

I, EDITORIAL

prerequisites:

WindowsServer server deployed in the server and that no Oracle client;

Server-based program uses Ibatis.net .NET4.0, for historical reasons;

Oracle Services version 12c;

 

Let me talk about the conclusion:

Developed using Oracle library ODP.net (ODAC), the Oracle.ManagedDataAccess.dll configured to Ibatis.net the provider.

 

Also look at a few related articles recommend it to everyone, very helpful,

.NET program to connect to Oracle in several ways: https: //blog.csdn.net/adliy_happy/article/details/77880360

ODP.net description: https: //www.cnblogs.com/xuekai-to-sharp/p/3586071.html

.NET program without Oracle client connection: https: //blog.csdn.net/chence19871/article/details/83344138

 

Second, download the file library

Oracle website registered account, download link: https: //www.oracle.com/technetwork/cn/database/windows/downloads/index-098472-zhs.html

ODP.NET_Managed_ODAC122cR1.zip machine body is small, Oracle.ManagedDataAccess.dll copied directly to the project under its own reference to download, unzip,

ODAC122010Xcopy_x64.zip machine body is large, can be obtained after extracting the Oracle.DataAccess.dll, with the need to use several other dll, this is not discussed.

 

Third, the provider configuration Ibatis.net

 

  <provider
    name="ManagedDataAccess4"
    description="Oracle, Oracle.ManagedDataAccess 4.122.18.3"
    enabled="true"
    assemblyName="Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342"
    connectionClass="Oracle.ManagedDataAccess.Client.OracleConnection"
    commandClass="Oracle.ManagedDataAccess.Client.OracleCommand"
    parameterClass="Oracle.ManagedDataAccess.Client.OracleParameter"
    parameterDbTypeClass="Oracle.ManagedDataAccess.Client.OracleDbType"
    parameterDbTypeProperty="OracleDbType"
    dataAdapterClass="Oracle.ManagedDataAccess.Client.OracleDataAdapter"
    commandBuilderClass="Oracle.ManagedDataAccess.Client.OracleCommandBuilder"
    usePositionalParameters = "false"
    useParameterPrefixInSql = "true"
    useParameterPrefixInParameter = "false"
    parameterPrefix=":"
    useDeriveParameters="false"
    />

 

Fourth, the configuration Ibatis.net the Map

   <provider name="ManagedDataAccess4"/>
    <dataSource name="SqlMap" connectionString="data source=127.0.0.1/orcl;user id=userId;password=mypws"/>
  </database>

 

Guess you like

Origin www.cnblogs.com/ywzdmu/p/11266792.html