Add Oracle 10g as Linked Server
- Hi,
I want to add an oracle server as linked server in SQL Server 2005.
I have followed all the steps given in link : http://www.ideaexcursion.com/2009/01/05/connecting-to-oracle-from-sql-server/-
Install Oracle Database 10g Client Release 2
- Install using the InstantClient option
-
Install Oracle 10g Release 2 ODAC (64-bit, 32-bit)
- Select the Oracle Data Access Components option (not .NET!)
- Edit TNSNAMES.ora
- <install directory>Product10.2.0ClientnetworkADMINTNSNAMES.ora (i.e. C:OracleProduct10.2.0ClientnetworkADMINTNSNAMES.ora)
- There is a very specific format to the network configuration file. Here is an example to get you started (just copy & paste multiple entries if necessary):
DMDEV = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = SERVERNAME)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = FRIENDLYNAME) ) )There are a couple of things you need to change:
- HOST = SERVERNAME. The value SERVERNAME should be changed to reflect the actual address or hostname of the target system.
- SERVICE_NAME = FRIENDLYNAME. FRIENDLYNAME is the name by which you refer to this actual connection.
- REBOOT!
- Configure provider in SQL Server
- Databases→DBName→Server Objects→Linked Servers→Providers→OraOLEDB.Oracle→Properties→Enable “Allow inprocess”
- Create a linked server to the Oracle Database
- General
- Linked Server: A name of your choosing which you will use when querying using four-part naming conventions.
- Provider: Oracle Provider for OLE DB
- Product Name: “Oracle” is fine here
- Data Source: This should match the HOST you defined in TNSNAMES.ora
- Security
- Select Be made using this security context and supply the remote login and password
BUT I am still not able to query the tables of Oracle database.
This is the error I am getting.
Cannot create a an instance of OLEdb provider "OraOLEDB.oracle" for linked server "<<link server name>>"
Please help....... -
Answers
What is the version of your SQL Server 2005, 32-bit or 64-bit? It it is 64-bit, please make sure that you have the matched 64-bit version Oracle client components installed.
Besides, please refer to this article to make a troubleshooting by yourself:
http://technet.microsoft.com/en-us/library/ms152516.aspx
Hope it helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Marked As Answer byJin ChenMSFT, ModeratorMonday, October 19, 2009 3:51 AM
All Replies
What is the version of your SQL Server 2005, 32-bit or 64-bit? It it is 64-bit, please make sure that you have the matched 64-bit version Oracle client components installed.
Besides, please refer to this article to make a troubleshooting by yourself:
http://technet.microsoft.com/en-us/library/ms152516.aspx
Hope it helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Marked As Answer byJin ChenMSFT, ModeratorMonday, October 19, 2009 3:51 AM





