|
Question : SQL Server 2005 Linked Server Oracle 9i Error message ORA-12154
|
|
I am trying to connect my local copy of SQL Server 2005 to a remote copy of Oracle 9i. The SID in the tnsnames.ora on the Oracle Server does match. I am at a loss at what the next(or first) step is or was. Do I need to install anything on my machine to allow the connection to happen?
I have an Oracle ODBC Driver but when I try to connect with it I get the same error:[Oracle]ORA-12154: TNS:could not resolve service name".
I am pulling my hair out! Thanks in advance for your help.
|
|
Answer : SQL Server 2005 Linked Server Oracle 9i Error message ORA-12154
|
|
Well it turns out I was using the wrong part of the TNSNAMES.ORA as the correct name. Once I used the correct name I was able to get SQL*Plus and TNSPING working perfectly. Then setting up the linked server I had to just mess with multiple settings until I was able to get it working.
For the linked server I used the following: Provider - Microsoft OLE DB Provider for Oracle Product Name - Oracle Data Source - NAME OF SOURCE I SETUP UP IN ODBC Data Source Admin
Then in security i added the login and password.
I also found out that I had to use this type of query: SELECT * FROM OPENQUERY(LINKEDSERVERNAME, 'SELECT * FROM TABLENAME')
and that the following type wouldn't work: SELECT * FROM LINKEDSERVERNAME..DBNAME.TABLENAME
Finally! Thanks lappins for your help!
|
|
|