Connection Dialog Box

Use the Connection dialog box to establish a connection to an Oracle database. This dialog box lets you specify detailed connection, such as the name of the Oracle data source to which you are connecting and the role you are assigned, and apply filters to select the schema nodes to be included in the display.

This section covers the following topics:

Opening the Connection Dialog Box

Open the Connection dialog box from either of the following locations:

  • In the toolbar at the top of the Server Explorer window, click the Add Connection icon.

  • In the Server Explorer window, right-click the Data Connections node and from the menu, select Add Connection for a new connection or select Modify Connection to modify the existing connection.

  • In the Visual Studio Tools menu, select Connect to Database.

The Add Connection and Modify Connection dialog boxes are similar to the following:

Basic Connection


Screenshot of Add Connection Dialog

TNS Alias


Screenshot of connection dialog image2

Advanced


Screenshot of connection dialog image3

Using the Connection Dialog Box

In general, to use the Add Connection dialog box, you enter the appropriate connection information, and optionally, click Test Connection to make sure the connection works.

The controls in the Connection dialog box are as follows:

Control Description

Data Source

This must be set to Oracle Database (ODP.NET, Managed Driver) in order to use this extension. If it is not set to that value, 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.

Connection Type

Select the connection type representing the style of connection information you wish to provide. Depending on which connection type you choose, the dialog will change.

  • Basic: You will provide Host/IP, Port, and Service Name

  • TNS Alias: You will provide a connection alias that is defined in a tnsnames.ora file.

  • Advanced: You will provide a "Easy Connect" connection string or a TNS connect descriptor.

Database host name (Basic)

The host name or IP address of the local or remote computer where Oracle Database resides.

Port number: (Basic)

The port that the database listens on for incoming connection requests (default port is 1521 which most databases are configured to use).

Service name (Basic)

The service name for the database.

Data source name (Basic)

The Easy Connect Connection string that will be used to connect to the database. Use the Data Source Name Copy Button to copy this to the clipboard if needed (for example if you need to use the connection string within your application).

Data Source Name Copy button (Basic)

Copies the Easy Connect connection string to the clipboard for use elsewhere (for example, in code).

TNS Admin Location (TNS Alias)

Use the drop down to select the path to your tnsnames.ora, sqlnet.ora, and ldap.ora files. Alternatively, click the browse button a select the correct directory. You can set the default value for this field in the Connection Configuration Options Page.

Data source name drop-down list (TNS Alias)

Select a database alias from the drop-down list.

The contents of the Data source name drop-down list is populated from the contents of your tnsnames.ora file and/or from an LDAP server (as configured in sqlnet.ora and ldap.ora).

NOTE: For LDAP configurations where NAMES.DIRECTORY_PATH is set only to LDAP, the aliases inside a tnsnames.ora file will be ignored and will not appear in this drop-down list. To use both LDAP and a tnsnames.ora file simultaneously, set NAMES.DIRECTORY_PATH=(LDAP,TNSNAMES) in sqlnet.ora.

For more information on configuring the tnsnames.ora, sqlnet.ora, and ldap.ora files, see Oracle Net Services Reference.

Data Source Name (Advanced)

Enter an Easy Connect connection string or TNS connect descriptor here.

Use wallet file (TNS Alias)

Check this checkbox if you wish to use a wallet file for authentication.

Wallet file location(TNS Alias)

Click the browse button a select the correct directory containing the wallet file. You can set the default value for this field in the Connection Configuration Options Page.

Role

Regular database users should select "Non-Administrator" from the dropdown. Autonomous Database "ADMIN" users should also select "Non-Administrator". For connecting as SYSDBA or SYSOPER to perform administrative tasks, select the appropriate role.

User name

Enter the username

Password

Enter the password

Save Password

Check this box to save the password for future use

Connection name

The connection name that Server Explorer uses to identify the connection. The name is automatically generated by default, but you can edit it.

Test connection

Click this option to test the connection information you have just entered.

Advanced

Opens the Advanced Properties Dialog Box.

Advanced Properties Dialog Box

You can access the Advanced Properties by clicking Advanced from the Add and Modify Connection Dialogs, or the Filters Tab on the Connection Dialog. Advanced properties allows you to modify advanced properties for the Oracle Connection. The connection type of the Add Connection dialog box determines the properties available.


Screenshot of Advanced Properties

Filters Tab

You can use filters to restrict the number of visible Server Explorer nodes.

This section covers the following topics:

About the Filters Tab

Use the Filters tab to create rules that determine which nodes appear in Server Explorer. For example, you can restrict Server Explorer to show only the HR schema, or show only the tables and views collection nodes, or you can filter the stored procedure collection to show only stored procedures that start with the letter a.

Filtering improves the performance of the Server Explorer by limiting the number of child nodes that are retrieved. This is also helpful when searching for specific subsets of child nodes. See Avoiding Performance Problems Due to Large Collections of Database Object Nodes.

Opening the Filters Tab

There are several ways to open the Filters tab.

  • From the Connections node or the Connection nodes, right-click and select Add Connection or Modify Connection. Then select the Filters tab.

  • Right-click on a connection node and select Filters. This opens the connection dialog with the Filters tab visible and the connection filters displayed.

  • Right-click on a collection node (for example, Tables) and select Filters. This opens the connection dialog with the Filters tab visible and any existing collection filters displayed. If a collection node has an active filter, then the icon for the collection changes to indicate this.

The Filters tab appears similar to the following:

Collections of connections may function differently from other collections as indicated in "Connection Filters".

First select the collection type from the list and choose Match all or Match any, if applicable, and then perform any of these actions:

To add a new condition: Select a Property, Condition, and Value from the lists. Then, click Add to add this condition to the filter group. Click OK to save your changes and close the dialog. NOTE: Conditions cannot be added for connection filters: they can only be updated.

To update an existing condition: From the filter group, select the condition you wish to modify. Then, change Property, Condition, or Value, as needed, selecting from the specific lists, and click Update. Note: If you click on a different row in the filter group before clicking Update, the change is lost.

To delete an existing condition: From the filter group, select the condition you wish to delete. Click Remove. NOTE: Conditions cannot be deleted for connection filters: they can only be updated.

To disable the filter: Select Disable Filter. NOTE: Connection filters cannot be disabled.

To enable the filter: Deselect Disable Filter.

Once the filter is modified, click OK to save your changes and close the dialog.

Using the Filters Tab

The controls in the Filter tab are as follows:

Control Description

Select a Collection

Select a collection from the list to modify a filter for a particular collection node or select Connection to modify a connection filter.

Disable Filter

Disables this filter. Use this control to turn filtering on and off. This is disabled for Connection filters.

Match Condition

Toggles to match either all conditions in the filter or any condition. This is disabled for Connection filters.

Filter Conditions Group

Lists existing conditions and enables you to create new conditions with the following information:

  • Property: Select or change the property to filter. You are limited to properties available to the object type of the collection node. Common properties are: name, owner, creation date, and type.

  • Condition: Select or change the condition operator from the list of condition operators. Condition operators vary depending on the chosen filter property.

  • Value: Enter a custom value or select a standard value from the list of values.

Add

Adds a condition to this filter. This is disabled for Connection filters.

Update

Updates the selected condition.

Remove

Removes the selected condition. This is disabled for Connection filters.

OK

Saves the filter and closes the dialog. If Disable Filter is checked, the filter is saved, but inactive.

Cancel

Cancels any changes to the filter that you made and closes the dialog.

Connection Filters

Connection filters are a special type of filter whose conditions cannot be added, removed, or disabled, only updated. To modify connection filters, choose Connection from the Select a Collection list. Connection filter have three filter group types: Displayed Schemas, Visible Collections, and Displayed Public Synonyms. You can modify the Displayed Schemas and Visible Collections by clicking the ellipse icon that appears besides the value, showing the Select Schemas or Select Collections dialog respectively.

The default values for displayed collections is taken from the Data Connections Options Page at the time that the connection was created. After a connection is created, the Data Connections Options Page values for displayed collections are ignored.

The changes made here persist across Visual Studio sessions.

Select Schemas

This is the Select schemas dialog, which has arrows to move collections from Available schemas to Displayed schemas and vice versa.

The controls in the Select schemas dialog box are as follows:

Control Description

Available schemas

Lists schemas available to be displayed.

Displayed schemas

Lists currently displayed schemas.

The changes made here persist across Visual Studio sessions.

Arrow buttons

Use the Left arrow, Right arrow, and Right All arrows to move the selection between the lists of available and displayed schemas.

OK

Applies the selected schema names in Server Explorer display for filtering.

Select Collections

This is the Select collection dialog, which has arrows to move collections from Available collections to Displayed collections and vice versa.

The controls in the Select collections dialog box are as follows:

Control Description

Available collections

Lists collections available to be displayed.

Displayed collections

Lists currently displayed collections. The default values for displayed collections is taken from the Data Connections Options Page at the time that the connection was created. After a connection is created, the Data Connections Options Page values for displayed collections are ignored.

The changes made here to the displayed collections persist across Visual Studio sessions.

Arrow buttons

Use the Left arrow, Right arrow, and Right All arrows to move the selection between the lists of available and displayed collections.

OK

Applies the selected collections names in Server Explorer display for filtering.

HTTPS Proxy Tab

You can use an HTTPS proxy to connect to an Oracle Database when the machine that hosts Visual Studio is behind a firewall or equivalent. This is commonly used to connect to Oracle Autonomous Database from behind a firewall.

This section covers the following topics:

About the HTTPS Proxy Tab

Use the HTTPS Proxy tab to to connect to an Oracle Database when the machine that hosts Visual Studio is behind a firewall or equivalent. This is commonly used to connect to Oracle Autonomous Database from behind a firewall.

Opening the HTTPS Proxy Tab

To open the HTTPS Proxy tab, from the Connections node or the Connection nodes, right-click and select Add Connection or Modify Connection. Then select the HTTPS Proxy tab.

The HTTPS Proxy tab appears similar to the following:


Screenshot of Opening the HTTPS Proxy Tab

Using the HTTPS Proxy Tab

The controls in the HTTPS Proxy tab are as follows:

Control Description

HTTPS Proxy Settings

Select None for no proxy. Select Auto-Detect to use proxy settings configured on the machine that hosts Visual Studio. Select Manual Configuration to specify the proxy settings yourself.

Hostname or IP Address

Enter the hostname or IP address of the proxy. This field is only enabled if HTTPS Proxy Settings is set to Manual Configuration.

Port Number

Enter the port number of the proxy. This field is only enabled if HTTPS Proxy Settings is set to Manual Configuration.

Connection Configuration Options Page

The Connection Configuration Options Page contains settings used by the Connection Dialog Box.

Accessing the Connection Configuration Options Page

To access the Connection Configuration Options Page, select Options... from the Tools menu. From the Options menu, select Oracle Developer Tools. Then select Connection Configuration.

Using the Connection Configuration Options Page

The Connection Configuration Options Page appears similar to the following:


Screenshot of Using the Connection Configuration Options Page

The controls of the Connection Configuration Options are as follows:

Control Description

TNS Admin Location

This directory is the default directory used in the TNS Admin Location field in the Connection Dialog Box.

Wallet File Location

This directory is the default directory used in the Wallet File Location field in the Connection Dialog Box.