Connecting to OracleDB with ODBC Connector

<< Click to Display Table of Contents >>

Raynet One Data Hub > 14.0 > Administration and User Guide > Guides and How-Tos 

Connecting to OracleDB with ODBC Connector

Introduction

This step-by-step guide shows how to configure Raynet One Data Hub to query information from Oracle database with DSN using an ODBC Oracle Instance Client Driver.

Prerequisites

On the Target Machine

A database user with read permission on the Oracle database is available.

Add a Service Naming and a Listener using the Oracle Net Manager.

oService Naming:

Add a Service Naming and take note of the Service Name, Protocol, Host-Name and Port. This information will be required later.
 
ora_image1
 

oListener:

Add a Listener listening on the Host-IP where the Oracle Database resides.
 
ora_image2

 

Configuring the Client Machine

1.Download the basic-package instantclient-basic-windows.x64-19.6.0.0.0dbru.zip
Download page: https://www.oracle.com/de/database/technologies/instant-client/winx64-64-downloads.html
 

2.Extract the zip file (it should contain a folder called instantclient_x_y).
 

3.Download the Instant Client ODBC package instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip
 

4.Unpack it in the same directory (instantclient_x_y) as the Basic package.
 

5.Run odbc_install.exe from the Instant Client directory.
 

6.Reboot your machine when prompted.
 

7.Go into the instanclient_x_y folder and create a subfolder Network\Admin
 
ora_image3
 

8.Write the following content and save it as tnsnames.ora in the above folder:
 
[TNSALIAS] =

         (DESCRIPTION=    

             (ADDRESS_LIST=      

                 (ADDRESS=(PROTOCOL=TCP)(HOST=[HOST])(PORT=[PORT]))

              )    

             (CONNECT_DATA=      

                 (SERVICE_NAME=[SERVICENAME])    

              )  

          )
 

9.Replace...
 

o[TNSALIAS] with anything you like. It will be needed during the configuration of the ODBC Driver.

o[HOST] with the host of your target machine.

o[PORT] with the port of your target machine.

o[SERVICENAME] with the service name configured on your target machine using Oracle Net Manager.
 

10. Open the ODBC Data Source Administrator (64-bit)  and select the tab System DSN
 
ora_image4
 

11. Click on Add… and select Oracle in instantclient_x_y. Click Finish.
 
ora_image5
 

12. A new window opens called Oracle ODBC Driver Configuration.
 

oIn the Data Source Name field type any name you like. You’ll need it later in Raynet One Data Hub when specifying the connection string for a task.

oIn the TNS Service Name field provide the same TNS alias name you provided in step 9.

oIn the User ID field type in c##[USERNAME], where [USERNAME] must be replaced by a username that has read access on the Oracle Database.

oLeave any other setting untouched.
 
ora_image6
 

13. Click Test Connection. Provide the password of the Oracle database user.
 
ora_image7
 

14. If the connection was successful the following window pops up:
 
ora_image8
 

15. Click OK.
 

16. Remember the value of the Data Source Name and click on OK in the Oracle ODBC Driver Configuration Window.
 

17. Install and configure Data Hub Agent, as described in the Raynet One Data Hub Installation Guide.

 

Configuring Data Hub Settings

1.Sign in to Raynet One Data Hub.

 

2.Create a new task using ODBC as the connector type.

 

3.Fill in the required fields in the General, Configuration, Connection and Agent Settings tabs. In the Connection tab use the following connection string, that connects to the oracle db through DSN:
 
DSN=[Data Soure Name];Uid=c##[USERNAME];Pwd=******;
 
where [Data Source Name] is replaced by the data source name you configured within the ODBC Date Source Administrator and [USERNAME] is replaced by the username of the user with read access on the Oracle database.
 
ora_image9