Connecting from .NET applications and Visual Studio
You can use Oracle Data Provider for .NET (ODP.NET) and Oracle Developer Tools for Visual Studio (ODT) to connect to Oracle Database Exadata Express Cloud Service. Visit the Oracle .NET Developer Center to learn more about ODP.NET and ODT.
Steps to install and connect are shown below.
If you have Visual Studio installed, download and install ODT and managed ODP.NET from one of the following links:
In addition, if you are using NuGet, you can also download the latest managed ODP.NET NuGet package.
If you only need to deploy ODP.NET to a .NET runtime, download the latest xcopy managed ODP.NET.
If you require the Oracle Data Access Components (ODAC), download ODAC 18.104.22.168.0 or later. (Note: earlier versions will not work with Oracle Database Exadata Express Cloud Service.)
In your web browser, navigate to the Exadata Express service console.
If Client Access is not currently enabled, click Enable Client Access on the console.
Click Download Client Credentials on the console to download
client_credentials.zip containing your security credentials and network configuration files that will allow client access to your cloud database. Save this zip file to a secure location.
Unzip the zip file contents:
- For ODT MSI install, unzip the zip file contents into [ORACLE_HOME]/network/admin directory. The default ORACLE_HOME is "C:\Program Files (x86)\Oracle Developer Tools for VS2017", "C:\Program Files (x86)\Oracle Developer Tools for VS2015", or "C:\Program Files (x86)\Oracle Developer Tools for VS2013".
- For ODAC install, unzip the zip file contents into [ORACLE_HOME]/network/admin directory. The default ORACLE_HOME is "C:\app\client\username\product\12.2.0\client_1".
- For xcopy, unzip the zip file contents into [ORACLE_HOME]/network/admin directory. Use the ORACLE_HOME setting you defined when running the installation script.
- For NuGet installations, unzip the contents into the web application root directory for ASP.NET applications or the .EXE directory for Windows applications.
In that directory, open the the sqlnet.ora file.
Edit the sqlnet.ora file and change the ?/network/admin entry to the directory where the zip file contents were placed.
For example, change:
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY=?/network/admin)))to:
WALLET_LOCATION = (SOURCE = (METHOD = file) (METHOD_DATA = (DIRECTORY=D:\MyOracleHome\network\admin)))
Transport Layer Security (TLS) 1.2 must be enabled to connect to Oracle Database Cloud Exadata Express Service. Some Windows operating systems will require this feature to be enabled through the addition of the following two Windows Registry settings under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client:
You can now use dbaccess as the data source alias. Along with the User Id and Password attributes, you can connect to the cloud database from your .NET application.
To connect from Visual Studio’s Server Explorer, go to the the Add Connection wizard from Server Explorer, choose ODP.NET, and select connection type “TNS”. Select dbaccess from the drop-down list.
Note: EZ Connect connection strings cannot be used due to the requirement that a wallet be used. For more information about other limitations review Known Issues for Oracle Database Exadata Express Cloud Service..