Oracle 链接服务器错误:ORA-12640:身份验证适配器初始化失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2641892/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle Linked Server error: ORA-12640: Authentication adapter initialization failed
提问by devXen
I have a linked server on SQL Server that talks to Oracle. Executing the following sql statement using Openquery
我在 SQL Server 上有一个与 Oracle 对话的链接服务器。使用 Openquery 执行以下 sql 语句
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.
在 {$ORACLE_HOME}\NETWORK\ADMIN\sqlnet.ora 中。它没有帮助。
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!!
非常感谢有关如何解决此问题的任何提示!!
采纳答案by Nathan DeWitt
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.
只是为了澄清 - 你们都连接到同一个 SQL Server 机器,该机器有一个到 Oracle 的链接服务器,他的查询执行而你的查询没有执行,对吗?我想排除 oracle 驱动程序和配置问题。
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.
如果你们都登录到 SQL Server 来运行您的查询,那么您需要查看您的链接服务器是如何设置来处理身份验证的。它是通过您的凭据传递(确保您对 Oracle 框具有权限),还是使用一组 Oracle 凭据?如果它使用 Oracle 凭据,那么我不知道发生了什么。
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.
如果您和您的同事都在各自的本地计算机上安装了 SQL Server,并且都创建了链接服务器,那么您应该检查您的 Oracle 驱动程序,然后检查您对 Oracle 的权限,并确保您拥有相同的 .ora文件。
回答by Waleed Al-Balooshi
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
除了已经说过的内容,请检查网络日志 {$ORACLE_HOME}\NETWORK\log 以查看是否列出了任何其他信息。此外,您还可以通过将以下几行添加到 sqlnet.ora 来启用 sqlnet 跟踪
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.
另外,尝试评论我们的 SQLNET.AUTHENTICATION_SERVICES= (NONE) 看看是否有帮助。检查以确保您使用的 ODAC 版本与服务器上的版本匹配。检查 Oracle 环境变量并确保一切都在那里并且正确无误。
The above is from
以上来自
http://www.dbforums.com/oracle/1615519-enough-ora-12640-please-help.htmlhttp://p2p.wrox.com/archives/oracle/2002-07/35.php
http://www.dbforums.com/oracle/1615519-enough-ora-12640-please-help.html http://p2p.wrox.com/archives/oracle/2002-07/35.php
回答by Steve Dignan
Instead of modifying your sqlnet.orafile, try overwriting it with your coworkers sqlnet.orafile (keeping a backup of your own just in case). For reference (but already noted in your question), the file can be found here...
不要修改您的sqlnet.ora文件,而是尝试用您的同事sqlnet.ora文件覆盖它(保留您自己的备份以防万一)。作为参考(但已在您的问题中注明),可以在此处找到该文件...
{$ORACLE_HOME}\NETWORK\ADMIN\sqlnet.ora
{$ORACLE_HOME}\NETWORK\ADMIN\sqlnet.ora