How to connect to Oracle database from asp.net website on our end ?

Databases
By default, we do not support customer to create Oracle database on our end , but customers can connect to Remote Oracle Database from asp.net website on our end.
This article is about how to connect asp.net to Oracle using Oracle Data Access Components. Below is the most detail steps you can refer to.
 
 
TAGS: ORACLE, ODAC, ODP.NET, ASP.NET.
 
To connect to an Oracle database from an asp.net application stored on our end, you must keep in mind with the deployment process:
 
1. Add reference to Oracle.DataAccess.dll in your asp.net Project.  Set “True” to “Copy to local” property.
2. In the bin folder copy the libraries.
  • oci.dll
  • ociw32.dll
  • orannzsbb12.dll
  • oraocci12.dll
  • oraociei12.dll
  • oraociicus12.dll
  • oraons.dll
  • OraOps12.dll
 
To find the address of these libraries, enter the Windows registry key HKEL_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET\4.121.2.0*
*4.121.2.0 corresponds to the version of Oracle Data Access Component installed in the development environment.
Use DllPath key, It will be something like: "harddrive:\APP\CLIENT\<<windowsuser>>\product\12.1.0\client_1\bin
 
 
3.  Edit web.config file and add below configuration:
 
<configuration>
  <configSections>
    <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    <section name="oracle.unmanageddataaccess.client" type="OracleInternal.Common.CustomSectionHandler, Oracle.DataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    <section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="system.data.oracleclient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </configSections>
 
  <system.data>
    <DbProviderFactories>
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
      <add name="ODP.NET, Unmanaged Driver" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET, Unmanaged Driver" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>
  </system.data>
 
  <oracle.manageddataaccess.client>
    <version number="4.121.2.0">
      <settings>
        <setting name="TNS_ADMIN" value="h:\root\home\......" />
      </settings>
    </version>
  </oracle.manageddataaccess.client>
 
</configuration>
 
If you are going to use TNSNAMES.ORA file, set the file path using the value of the TNS_ADMIN property
 
4. Obtain the IP address for your website by ping the temp URL from your end, then enable at Oracle database that IP address to allow it to connect. At the same time , you need to open outgoing port on our end for your Oracle db server via Control Panel ---> Security---> Outgoing port manager. Please note This feature only available for .net premium or higher plan.