从 MS SQL Server 2005 浏览目录将服务器链接到 Intersystems Cache 数据库
我试图在 MS SQL Server 2005 中创建一个链接服务器,通过 ODBC 指向系统间缓存数据库。
下面是创建链接服务器的查询:
/****** Object: LinkedServer [CC7] Script Date: 02/22/2011 09:06:39 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'CC7', @srvproduct=N'MSDASQL', @provider=N'MSDASQL', @datasrc=N'CC7', @provstr=N'DRIVER={Intersystems ODBC};Server=CCMSSRVR;Port=1972;Database=CCMS_STAT', @catalog=N'CCMS_STAT'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'CC7',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'use remote collation', @optvalue=N'true'
我可以查询数据库,例如如下:
SELECT * FROM CC7..dbo.iAgentByApplicationStat
这工作正常。
我遇到的问题是当我尝试通过 Microsoft SQL Server Management Studio 浏览目录时。每当我在链接服务器下展开“目录”时,我都会收到以下错误:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The OLE DB provider "SQL Server" for linked server "(null)" reported an error. One or more arguments were reported invalid by the provider.
Cannot obtain the schema rowset "DBSCHEMA_CATALOGS" for OLE DB provider "SQL Server" for linked server "(null)". The provider supports the interface, but returns a failure code when it is used. (Microsoft SQL Server, Error: 7399)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=7399&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
我已经用谷歌搜索了好几天,但没有结果,因此非常感谢任何帮助,无论多小。
I'm trying to create a linked server in MS SQL Server 2005, pointing to an Intersystem Cache database via ODBC.
Below is the query to create the linked server:
/****** Object: LinkedServer [CC7] Script Date: 02/22/2011 09:06:39 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'CC7', @srvproduct=N'MSDASQL', @provider=N'MSDASQL', @datasrc=N'CC7', @provstr=N'DRIVER={Intersystems ODBC};Server=CCMSSRVR;Port=1972;Database=CCMS_STAT', @catalog=N'CCMS_STAT'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'CC7',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'rpc', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'rpc out', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'use remote collation', @optvalue=N'true'
I can query the database, for example as below:
SELECT * FROM CC7..dbo.iAgentByApplicationStat
This works fine.
The problem i'm having is when i try and browse the catalog through Microsoft SQL Server Management Studio. Whenever i expand 'Catalogs' under the linked server i get the following error:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The OLE DB provider "SQL Server" for linked server "(null)" reported an error. One or more arguments were reported invalid by the provider.
Cannot obtain the schema rowset "DBSCHEMA_CATALOGS" for OLE DB provider "SQL Server" for linked server "(null)". The provider supports the interface, but returns a failure code when it is used. (Microsoft SQL Server, Error: 7399)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=7399&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
I've googled this for days to no avail, so any help no matter how small is very much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
然后你再试一次,
我正在做 SSRS 的 CCM7 报告,如果你也这样做,请告诉我。
我的 MSN:[电子邮件受保护]
:)
then you try again,
I am doing for CCM7 reports by SSRS, please let me know if you same to do it.
My MSN: [email protected]
: )