我无论在 Sql server 2000,or Sql Server 2005上运行都有这问题
SELECT a.*
FROM OPENROWSET( 'MSDASQL ',
'192.168.0.44,1433;UID=sa;PWD= ',
'select * from SendMessage.dbo.msg_ReceiveMessage ') AS a
错误信息:
链接服务器 "(null) "的 OLE DB 访问接口 "MSDASQL " 返回了消息 "[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序 "。
无法初始化链接服务器 "(null) " 的 OLE DB 访问接口 "MSDASQL " 的数据源对象。
希望高人提醒我下,谢谢
而且我也设置了下Sql Server的配置
exec sp_configure 'show advanced options ', '1 '
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries ', '1 '
------解决方案--------------------
SELECT a.*
FROM OPENROWSET( 'MSDASQL ',
'192.168.0.44,1433;UID=sa;PWD= ' ' ' ' ',
'select * from SendMessage.dbo.msg_ReceiveMessage ') AS a
------解决方案--------------------
SELECT a.*
FROM OPENROWSET( 'MSDASQL ',
'DRIVER={SQL Server};SERVER= '192.168.0.44,1433;UID=sa;PWD= ',
'select * from SendMessage.dbo.msg_ReceiveMessage ') AS a
------解决方案--------------------
SELECT a.*
FROM OPENROWSET( 'sqloledb ', '192.168.0.44 ';sa; ' ', 'select * from SendMessage.dbo.msg_ReceiveMessage ') AS a