What You See Is What You Get Element

Oracle and Visual Studio Quickstart


Welcome, Visual Studio developers!  Use this Quickstart guide to start using Oracle's free .NET tools and products as quickly as possible!


 

Get Installed



Step 1: Click here to download a 32-bit Oracle Data Access Components (ODAC) bundle which includes "Oracle Developer Tools for Visual Studio". Download the newest version available.

If you are using Visual Studio 2017 Community Edition, please use this link instead.



Step 2
: Install ODAC:
           
            1) Extract the zip file
            2) Run setup.exe  
            3) Choose to install into a new "Oracle Home" (subdirectory)
            4) Choose to install at least "Oracle Developer Tools for Visual Studio" (if you do not
                 see it, you have downloaded the wrong package)
            5) If prompted, select the version(s) of Visual Studio you wish to integrate with
                 (eg Visual Studio 2017)


Step 3
: Create a new connection in Visual Studio:
          
           Create a new connection from Server Explorer in Visual Studio and use these images as guides: change the datasource, making sure to choose the flavor of ODP.NET that your .NET application will use (Managed or Unmanaged) - and then connect to oracle. In the Oracle connection dialog, if you have a connection alias choose a "Connection Type" of "TNS" and then choose the alias from the "Data Source Name" drop down list. If you do not have a connection alias, you can choose a Connection Type of "EZ Connect" and then provide the host, port, and service name for the database you wish to connect to.

This EZCONNECT format can be used in .NET code as well, and has the following format:

           host[:port][/service_name]
           host = the database server machine's host name
           port = the port where the database listens for incoming connection requests
                      (default port is 1521 which most databases are configured to use)
           service_name = the database's global name

          For example
          sales-server:1521/sales.us.acme.com
       

Step 4
: Verify that pre-existing connection aliases are available to Visual Studio
          
            If prior to this installation you already had a working connection to Oracle, the installer will attempt to make sure that these connect aliases will continue to be available to this new installation. If in the previous step you did not see an alias in the "Data Source Name" drop down that you have used in the past , do the following:

            1) Search the 32-bit .NET Framework's machine.config for "TNS_ADMIN" which was added by the Oracle installer.  This can be found in C:\Windows\Microsoft.NET\Framework\v4.x....\Config.
            2) In the location pointed to by this TNS_ADMIN value, view the TNSNAMES.ORA file and verify that aliases you have previously used are listed inside this file.
            3) If no TNSNAMES.ORA file exists in this location, search your machine for additional copies of the file and copy it over to this location. If the TNSNAMES.ORA file exists, but some of the aliases are missing, search for the TNSNAMES.ORA file where these aliases are included and cut and paste the aliases into this file.
 
           Note: If prior installations relied upon LDAP (instead of TNSNAMES.ORA)  to look up connection aliases and this is no longer is working with the new installation, see the online help for more information.




Get Started


Video: Oracle Integration with Visual Studio
Oracle by Example Step-by-Step Walkthroughs (Basic features)
Oracle by Example Step-by-Step Walkthroughs (New 12c Features)
Technical Article: Getting Started with Oracle Database and Visual Studio
Visit the .NET Developer Center for additional content

 



Get Help


Oracle .NET Forums


 

Get Deployed


ODP.NET is available as both a fully managed driver, and also as an unmanaged driver.

ODAC is available for 32-bit and separately for 64-bit platforms, as it relies on these unmanaged Oracle client components. For design time development work using Visual Studio, the 32-bit version is required, as indicated above. However, for deployment, you may choose between 32-bit or 64-bit unmanaged ODAC, or use ODP.NET, managed driver. To download 64-bit ODAC for deployment purposes, or the fully managed driver by itself, click here. ODP.NET managed driver is also available on Nuget.




Get Migrated


Currently using the Microsoft OracleClient for .NET data access? Visit our OracleClient Migration page.