Want to connect from an Oracle database (8i) on solaris to a SQL server
database. Clients can't/won't pay for the Oracle gateway product, can anyone recommend a 3rd party client ODBC driver (will install DBI:ODBC on top of this).
Heterogeneous Services - Generic Connectivity In Oracle9i
Oracle9i, like previous versions, supports heterogeneous services to allow data in non-Oracle database to be queried using SQL. This support has been in the form of transparent gateways, which are vendor specific, or generic connectivity which uses ODBC or OLEDB to make the connections. The functionality supported by generic connectivity is typically more limited than that possible when using vendor specific gateways, but it is quick and simple to configure. The steps listed below can be used to connect Oracle to any ODBC compliant database (MS Access, SQL Server etc.) on the local server:
Make sure a valid username and password are present for the non-Oracle database (MyUser/MyPassword).
Create an ODBC DataSource for the non-Oracle database (Access1).
Create a file called: ORACLE_HOME\hs\admin\initACCESS1.ora which contains:
HS_FDS_CONNECT_INFO = Access1 #ODBC DSN
HS_FDS_TRACE_LEVEL = OFF
Add the following entry to the tnsnames.ora file:
Add the following entry into the listener.ora file:
Reload the listener: lsnrctl reload
Create a database link using:
CREATE DATABASE LINK access1.world CONNECT TO "MyUser" IDENTIFIED BY "MyPassword" USING 'ACCESS1.WORLD';
Query the table using:
With MS Access the first query is slow due to the Access application being loaded. As expected, subsequent queries do not display a similar lag.