sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO
declare @ServiceUrl as varchar(1000)
set @ServiceUrl = 'http://192.168.2.8:38888/plan/update.xml'
DECLARE @data varchar(max);
set @data=''
Declare @Object as Int
Declare @ResponseText AS varchar(8000) ;
Exec sp_OACreate 'Msxml2.ServerXMLHTTP.3.0', @Object OUT;
Exec sp_OAMethod @Object, 'open', NULL, 'GET',@ServiceUrl,'false'
Exec sp_OAMethod @Object, 'send', NULL, @data --发送数据
Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
--EXEC sp_OAGetErrorInfo @Object --异常输出
Select @ResponseText
Exec sp_OADestroy @Object
GO
sqlserver获取其他网页数据
最新推荐文章于 2024-05-15 10:06:49 发布