在SQL Server2008 R2中从链接服务器(Oracle)运行查询 [英] Run a Query from Linked Server (Oracle) in SQL Server2008 R2
本文介绍了在SQL Server2008 R2中从链接服务器(Oracle)运行查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在SQL Server 2008中设置了链接服务器.但是我无法对链接服务器运行任何查询.
I have the linked server set up in SQL Server 2008. But I could not run any query against the linked server.
我试图运行这个简单的命令,但是它不起作用
I tried to run this simple command but it's not working
SELECT * FROM MYSERVER..ALANH.TEMP_UPDATE1
这是我运行上述命令时遇到的错误.
This is the error I got when I run the above command.
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "MYSERVER" reported an error. The provider did not give any information about the error.
Msg 7312, Level 16, State 1, Line 1
Invalid use of schema or catalog for OLE DB provider "OraOLEDB.Oracle" for linked server "MYSERVER". A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog or schema.
有人可以帮助我连接到OracleLinkedServer吗?非常感谢.
Could anyone help me to connect to the OracleLinkedServer? Thanks very much.
推荐答案
您也可以那样:
**SELECT * FROM OPENQUERY(MYSERVER, 'SELECT * FROM ALANH.TEMP_UPDATE1')**
这篇关于在SQL Server2008 R2中从链接服务器(Oracle)运行查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文