小编rev*_*oua的帖子

从PostgreSQL查询SQL Server

Windows下有SQL Server 2008 R2和PostgreSQL 9.2(目前是XP SP3).如何从PostgreSQL查询SQL Server?当SQL Server-> PostgreSQL通过链接服务器时没问题.
搜索网络,我发现odbc_fdw这是不可能的编译9.2.

有没有可行的解决方案?

sql-server postgresql odbc sql-server-2008-r2 postgresql-9.2

7
推荐指数
1
解决办法
3670
查看次数

上下文中的msxml3.dll sp_OAMethod'send'

Win200 + SQL Server 2005中的工作代码无法在Win2012 + SQL Server 2012 sp1下运行.

我找到的唯一真正的解决方案是:

我将C:\ Windows\System32\msxml3.dll从Server 2008复制到服务器2012上的同一目录.2012服务器问题解决了,发送POST和GET工作正常.

但由于我无法修改服务器并且msxml3.dll和msxml6.dll都被锁定 - 我需要了解错误并以其他方式应用.

代码与往常一样简单,可以抓取肥皂网服务:

Declare @Object as Int;
Declare @ResponseText as Varchar(8000);
Declare @ErrCode    Int;

Exec sp_OACreate 'MSXML2.ServerXMLHTTP', @Object OUT;
Exec sp_OAMethod @Object, 'open', NULL, 'post','http://example.com/Authentication.asmx','false'
Exec sp_OAMethod @Object ,'setRequestHeader'    ,NULL ,'Content-Type'   ,'text/xml; charset=utf-8'
Exec sp_OAMethod @Object ,'setRequestHeader'    ,NULL ,'SOAPAction' ,'"http://www.example.com/Login"'
Exec @ErrCode=sp_OAMethod @Object, 'send',null,'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <Login xmlns="http://www.example.com/">
      <databaseName>db1</databaseName>
      <userName>login</userName>
      <password>pass</password>
    </Login>
  </soap:Body>
</soap:Envelope>'
Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
Select …
Run Code Online (Sandbox Code Playgroud)

sql t-sql soap ole sql-server-2012

5
推荐指数
1
解决办法
3811
查看次数