Connecting to Oracle (ODBC) Print this Topic Previous Page Up One Level Next page

Home >  Connecting to a Database > Database Connection Examples >

Connecting to Oracle (ODBC)

This example illustrates a common scenario where you connect from DiffDog to an Oracle database server on a network machine, through an Oracle database client installed on the local operating system.


The example includes instructions for setting up an ODBC data source (DSN) using the database connection wizard in DiffDog. If you have already created a DSN, or if you prefer to create it directly from ODBC Data Source administrator in Windows, you can do so, and then select it when prompted by the wizard. For more information about ODBC data sources, see Setting up an ODBC Connection.




The Oracle database client (which includes the ODBC Oracle driver) must be installed and configured on your operating system. For instructions on how to install and configure an Oracle database client, refer to the documentation supplied with your Oracle software.
The tnsnames.ora file located in Oracle home directory contains an entry that describes the database connection parameters, in a format similar to this:




     (ADDRESS = (PROTOCOL = TCP)(HOST = server01)(PORT = 1521))



     (SID = orcl)




The path to the tnsnames.ora file depends on the location where Oracle home directory was installed. For Oracle database client 11.2.0, the default Oracle home directory path could be as follows:


You can add new entries to the tnsnames.ora file either by pasting the connection details and saving the file, or by running the Oracle Net Configuration Assistant wizard (if available).



To connect to Oracle using ODBC:

1.Start the database connection wizard.
2.Select Oracle (ODBC / JDBC), and then click Next.


3.Select ODBC.


4.Click Edit Drivers.


5.Select the Oracle drivers you wish to use (in this example, Oracle in OraClient11g_home1). The list displays the Oracle drivers available on your system after installation of Oracle client.
6.Click Back.
7.Select Create a new data source name (DSN) with the driver, and then select the Oracle driver chosen in step 4.


Avoid using the Microsoft-supplied driver called Microsoft ODBC for Oracle driver. Microsoft recommends using the ODBC driver provided by Oracle (see

8.Click Connect.


9.In the Data Source Name text box, enter a name to identify the data source (in this example, Oracle DSN 1).
10.In the TNS Service Name box, enter the connection name as it is defined in the tnsnames.ora file (see prerequisites). In this example, the connection name is ORCL.
11.Click OK.


12.Enter the username and password to the database, and then click OK.

© 2019 Altova GmbH