EF Oracle TNS 连接

  <oracle.manageddataaccess.client>
    <version number="*">
      <settings>
        <setting name="TNS_ADMIN" value="D:\CPA\instantclient_11_2\"/>
      </settings>
      <dataSources>
        <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/>
      </dataSources>
    </version>
  </oracle.manageddataaccess.client>
  <connectionStrings>
    <add name="OracleDbContext" providerName="Oracle.ManagedDataAccess.Client"
      connectionString="User Id=oracle_user;Password=oracle_user_password;Data Source=oracle"/>
    <add name="OracleModel" connectionString="DATA SOURCE=CPA_srv2;PASSWORD=*;USER ID=*;"
  providerName="Oracle.ManagedDataAccess.Client"/>
  </connectionStrings>

 

posted @ 2019-03-31 01:35  -Ward-  阅读(193)  评论(0编辑  收藏  举报