Connecting to Oracle Database from Visual Studio
ODT connects to a database using a host name, port number, and service name as identifying information. This information can be provided to the Server Explorer Data Connections dialog box directly, or as part of a connection string, or these connection details can be referenced via a TNS alias that is located in a tnsnames.ora file.
For more information on creating or modifying the tnsnames.ora file, see Oracle Net Services Administrator's Guide.
After you have ascertained the hostname, port number, and service name for your database (or have obtained a tnsnames.ora file), you can start Visual Studio and connect to Oracle Developer Tools using Server Explorer.
To connect to an Oracle database from Visual Studio:
-
To open Server Explorer, select it from the View menu.
In Server Explorer, right-click the Data Connections node and from the menu, select Add Connection.
-
In the connection dialog box if the Data Source field is not set to "Oracle Database (ODP.NET, Managed Driver)" then press the Change button to open the Change Data Source dialog. In that dialog, in the Data Source list, select Oracle Database, and in the Data Provider dropdown, select ODP.NET Managed Driver. Then check Always Use This Selection.
The Add Connection dialog box appears similar to the following:

If the connection dialog box does not look like this, then please check to make sure the Data Source field is set to "Oracle Database (ODP.NET, Managed Driver)".
-
In the Add Connection dialog box, enter the connection information.
See Also: