1

我正在尝试从 Azure SQL 托管实例数据库调用 API 服务,但出现以下错误。但是,当我从本地 SQL 服务器执行时,它工作正常。

我使用了以下查询:

USE MASTER
GO
sp_configure 'show advanced options', 1 
GO 
RECONFIGURE; 
GO 
sp_configure 'Ole Automation Procedures', 1 
GO 
RECONFIGURE; 

GO 
sp_configure 'show advanced options', 0
GO 
RECONFIGURE; 

Exec sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
Exec sp_OAMethod @Object, 'open', NULL, 'post',
'https://localhost:7071/api/HashPwd', 
'false'
Exec sp_OAMethod @Object, 'send'
Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
Select @ResponseText

Error ---
Msg 17750, Level 16, State 0, Procedure sp_OACreate, Line 1 [Batch Start Line 0]
Could not load the DLL odsole70.dll, or one of the DLLs it references. Reason: 2(The system cannot find the file specified.).
Msg 17750, Level 16, State 0, Procedure sp_OAMethod, Line 1 [Batch Start Line 0]
Could not load the DLL odsole70.dll, or one of the DLLs it references. Reason: 2(The system cannot find the file specified.).
Msg 17750, Level 16, State 0, Procedure sp_OAMethod, Line 1 [Batch Start Line 0]
Could not load the DLL odsole70.dll, or one of the DLLs it references. Reason: 2(The system cannot find the file specified.).
Msg 17750, Level 16, State 0, Procedure sp_OAMethod, Line 1 [Batch Start Line 0]
Could not load the DLL odsole70.dll, or one of the DLLs it references. Reason: 2(The system cannot find the file specified.).

如何修复错误?

4

1 回答 1

0

如果你想使用 OLE 自动化存储过程,我们可以在本地 SQL 服务器上使用它。我们不能在 Azure SQL 数据库或 Azure SQL 托管实例中使用它。更多详细信息,请参阅文档文档

于 2020-05-28T02:51:57.533 回答