MAK (Muthusamy Anantha Kumar)

Linked server to Oracle database :

Install and Configure Oracle Client

Get the IP address, database name, userID, password and port number used in Oracle server, from the Oracle database administrator. Install the Oracle client on the SQL Server box. Oracle client reads information about Oracle from the TNSNAMES.ORA file. Edit the Edit the TNSNAME.ORA file and update it with appropriate information, (ex. Below).

MyOracle =
  (description =
          (address_list =
                (address =
                 (community =
                 (protocol = tcp)
                 (host =
                 (port = 1527)
   (connect_data = (sid = oradatabase )


Create the ODBC System DSN for Oracle with the appropriate information on the SQL Server Box.

Create Linked Server for Oracle

Open the Enterprise manager, and right click on Linked Server under the Security Folder. Create a new linked server. Select OLE DB Provider for the Oracle Drivers. Give the same system ODBC DSN name that you created for Oracle in the textbox provided for DataSource. Provide userid and password in the provider string and security tab.

Test the connection by running the following SQL command in query analyzer.

Select * from openquery(MyOracle, "Select column1 from table1")

These are the major heterogeneous databases that we can access from SQL server using 3rd party supplied drivers and ODBC drivers. This will give you a general idea of how SQL server interacts with heterogeneous databases through Open Database connectivity.