Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Accessing oracle data using linked server

Author  Topic 

venkath
Posting Yak Master

202 Posts

Posted - 2006-06-22 : 11:28:41
Hi all

How to access oracle table using linked server..
what are the parameters to be provided..

Thanks

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2006-06-22 : 12:33:37
here is what you need

1. install the proper ORacle client, make sure to also install Oracle ODBC and/or OLE DB driver. this might be a separate download (check technet.oracle.com for this)
2. make sure the tnsnames.ora file has the proper oracle db info in it and you can connect to Oracle from your host using sqlplus.
3. configure the linked server using the ODBC or OLEDB driver. You need to know databsae name (from tnsnames.ora), login and password to use.
4. Test your linked server using the following syntax:

SELECT * from ORACLEDB..SCHEMA.TABLENAME


Notice the two dots in the above syntax, that is important. Oracle is also case sensitive and you will need to use all uppercase with SCHEMA and TABLENAME information. The ORACLEDB info above is the name you have give your linked server, many times it corresponds to the databsename you have in your tnsnames.ora.

Any selects you want to do from your linked server should probably use OPENROWSET or OPENQUERY. Look them up (or google) in books online for more information and syntax. OPENROWSET/OPENQUERY combined with using the Oracle OLEDB driver will give you the best performance on your linked server queries.

After doing the above post back if you have any problems.



-ec
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-06-26 : 09:35:07
Read this article at Microsoft http://support.microsoft.com/default.aspx?scid=kb;en-us;280106 .


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -