Accessing Data Using Oracle From Non-oracle Databases
Accessing Data of Non-Oracle Databases from Oracle
Introduction:
This document gives an overview of the Heterogeneous connections and the steps for configuration to access the data of non-oracle databases from Oracle database environment.
ACCESSING NON-ORACLE DATABASES FROM ORACLE
There may be some requirements to access the Data residing in different flavors of Databases like MS-SQL, Access, and Sybase from the Oracle database. This can be achieved with the help of creating Heterogeneous Services to connect to non-oracle flavors of the database and also integrate the data residing in them. The HS (Heterogeneous Services) is created with the help of the ODBC drivers for that particular flavor of the database (e.g. For MS-Access we need MS driver for Access). Generic Connectivity is implemented by using a Heterogeneous Services ODBC agent. An ODBC agent is included as part of the Oracle system and is installed in the same ORACLE_HOME and resides in the folder HS.
The following steps needs to be performed in order to configure a Heterogeneous connection in the Oracle Database:
1. Preparing the Non-oracle environment from where in the data needs to be integrated into the Oracle database.
2. Creation of the ODBC connection.
3. Test the ODBC drivers to ensure that connectivity is made to the non-Oracle database.
4. Ensure the Global_names parameter in Oracle database is set to False.
5. Configure the Heterogeneous services. This is done with the help of creating an initodbc.ora.
7. Modify the Listener.ora and the TNSNAMES.ORA file so that to connect to the Database.
8. Restart the Listener or START the listener if a new one has been created specific for the new connection.
9. Creation of the Database Link to connect to the HS connection.
10. Test the connection using thee DB Link.
Let us see the above steps in a brief fashion. Here we can consider of having a MS-Access Database from where in the data needs to be accessed into Oracle database:
Create the MS-Access database or copy the same to the local server where in the Database is hosted.
Create the ODBC connection. This can be done as follows:
Click on START à Control Panel à Administrative Tools and then open Data Sources (ODBC)
Click on the SYSTEM DSN Tab and then click on the ADD button.
Select Microsoft Access Driver (*.mdb) and then click on FINISH.
After that, enter the Data source name using which you would like to connect to the MS-Access Database (here in our case it’s ChryslerMDB). Also, select the MS-Access file by clicking on SELECT button and then click on OK to complete the configuration.
Check for the connectivity and confirm whether the ODBC connection is working fine.
Once this is done, Check for the GLOBAL_NAMES parameter in the Oracle database and make sure that it is FALSE. The following query can be used for the same :