Build a .NET Application with Visual Studio and Visual Studio Code
Oracle Autonomous Database on Dedicated Exadata Infrastructure supports connectivity to the Microsoft .NET Framework, .NET Core, Visual Studio, and Visual Studio Code.
Oracle Data Provider for .NET (ODP.NET) provides run-time ADO.NET data access to an Autonomous Database. ODP.NET has the following driver types:
-
Unmanaged ODP.NET for .NET Framework applications
-
Managed ODP.NET for .NET Framework applications
-
ODP.NET Core for .NET Core applications
Oracle Developer Tools for Visual Studio provides database application design-time support in Visual Studio, including tools for managing Autonomous Databases in Oracle Cloud.
Oracle Developer Tools for VS Code provides database application design-time support in Visual Studio Code.
These software components are available as a free download from the following sites:
- Managed ODP.NET and ODP.NET Core: NuGet Gallery
- Unmanaged ODP.NET: Oracle Data Access Components Downloads
- Oracle Developer Tools for Visual Studio Code: VS Code Marketplace
- Oracle Developer Tools for Visual Studio: Visual Studio Marketplace
Oracle recommends using the latest provider and tools version with an Autonomous Database.
Set-Up Instructions
Refer to Developing .NET Applications for Oracle Autonomous Database for instructions on how to download, install, and configure these components for use with Oracle Autonomous Database on Dedicated Exadata Infrastructure.
Note that these instructions show how to make TCPS (TCP with SSL) connections to your database, which requires using wallets. For databases on dedicated infrastructure, you can instead make TCP connections to the database, which does not require use of a wallet.
To learn more about using Oracle Autonomous Database on Dedicated Exadata Infrastructure and .NET, try the free .NET Development with Oracle Autonomous Database Quick Start. This lab walks you through setting up a .NET web server on Oracle Cloud Infrastructure that connects to Autonomous Database. Next, the lab guides developing and deploying a simple ASP.NET Core web application that uses all these components. By the end, you will have a live, working website on the Internet.
Configure for High Availability and Performance
In the newest ODP.NET versions, Fast Connection Failover (FCF) and Connection Runtime Load Balancing (RLB) are enabled automatically via the connection string default settings. FCF requires the connection string settings, Pooling (true) and HA Events (true). RLB requires the settings, Pooling (true) and Load Balancing (true).
Application Continuity is currently only available in unmanaged ODP.NET. It is enabled by default via the connection pool setting, Application Continuity (true).
No additional configuration is necessary when using TCP for ONS connections.
ONS TCPS requires some configuration and code changes depending on the provider used:
-
ODP.NET Core. To configure ONS TCPS for ODP.NET Core, use OracleConfiguration.OnsWalletLocation to enable TPCS and indicate the wallet location.
OracleConfiguration.OnsWalletLocation = @"<wallet-directory>";
-
ODP.NET Managed Driver. To configure ONS TCPS for managed ODP.NET, modify the oracle.manageddataaccess.client configuration section similar to the sample below.
<oracle.manageddataaccess.client> <version number="*"> <onsConfig mode="remote"> <settings> <setting name="Protocol" value="TCPS" /> <setting name="WALLET_LOCATION" value="<wallet-directory>" /> </settings> <ons database="<database-name>"> <add name="nodeList" value="slcai611:6205,slcai610:6205,slcai612:6205" /> </ons> </onsConfig> <settings> <setting name="WALLET_LOCATION" value="<wallet-directory>" /> </settings> </version> </oracle.manageddataaccess.client>
-
ODP.NET Unmanaged Driver. To configure ONS TCPS for unmanaged ODP.NET, modify the oracle.unmanageddataaccess.client configuration section similar to the sample below.
<oracle.unmanageddataaccess.client> <version number="*"> <onsConfig mode="remote"> <settings> <setting name="Protocol" value="TCPS" /> <setting name="WALLET_LOCATION" value="<wallet-directory>" /> </settings> <ons database="<database-name>"> <add name="nodeList" value="slcai611:6205,slcai610:6205,slcai612:6205" /> </ons> </onsConfig> <settings> <setting name="WALLET_LOCATION" value="<wallet-directory>" /> </settings> </version> </oracle.unmanageddataaccess.client>
Parent topic: Build Database Applications with Autonomous Database