tags:

views:

152

answers:

3

I have a linked server on SQL Server that talks to Oracle. Executing the following sql statement using Openquery

 SELECT * FROM OPENQUERY(finance, 'select * from KFRI.VW_XREF_PROJECTS')

will get error as the following:

OLE DB provider "OraOLEDB.Oracle" for linked server "finance" returned message "ORA-12640: Authentication adapter initialization failed".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "finance".

I tried to set :

SQLNET.AUTHENTICATION_SERVICES= (NONE)

in {$ORACLE_HOME}\NETWORK\ADMIN\sqlnet.ora. It did not help.

What's interesting is my coworker is able to execute the exactly same query successfully on his machine without a hitch.

Any tips on how to fix this is greatly appreciated!!

+1  A: 

Just to clarify - you are both connecting to the same SQL Server box that has a linked server to Oracle, and his query executes and yours does not, correct? I want to rule out oracle drivers and configuration issues.

If you're both logging onto the SQL Server to run your query, then you need to look at how your linked server is set to handle authentication. Is it passing through your credentials (make sure you have permissions on the Oracle box), or is it using a set of Oracle credentials? If it's using Oracle credentials, then I have no idea what's going on.

If you and your co-worker each have SQL Server installed on your respective local machines, and have both created a linked server, then you should check your Oracle driver, then check your permissions on Oracle, and make sure you have the same .ora files.

Nathan DeWitt
A: 

In addition to what has already been said, check the network log {$ORACLE_HOME}\NETWORK\log to see if there is any additional information listed. Also you can also enable sqlnet tracing by adding to the following lines to sqlnet.ora

trace_level_client=16 
trace_file_client=cli 
trace_directory_client=c:\temp 
trace_unique_client=true 
trace_timestamp_client=ON 

Also, try to comment our SQLNET.AUTHENTICATION_SERVICES= (NONE) and see if that helps. Check to make sure that the ODAC version you are using matches the one on the server. Check the Oracle environment variables and make sure everything is there and correct.

The above is from

http://www.dbforums.com/oracle/1615519-enough-ora-12640-please-help.html http://p2p.wrox.com/archives/oracle/2002-07/35.php

Waleed Al-Balooshi
A: 

Instead of modifying your sqlnet.ora file, try overwriting it with your coworkers sqlnet.ora file (keeping a backup of your own just in case). For reference (but already noted in your question), the file can be found here...

{$ORACLE_HOME}\NETWORK\ADMIN\sqlnet.ora

Steve Dignan