question

MSProg-4478 avatar image
0 Votes"
MSProg-4478 asked KalyanChanumolu-MSFT answered

Managed Instance - Any alternative to sp_OACreate ?

Hi,
We are in the process of migrating our on-prem SQL Server to cloud Azure Managed Instance.
One of our current stored-proc uses OLE Automation sp_OACreate to create WinHTTP.WinHTTPRequest.5.1 object.

Basically, We have a portal running and this stored proc uses sp_OACreate to check if the portal url is working or not.
if not, the sp calls DBMail to alert the support team. This sp is invoked via a Sql Agent job.

I see that OLE Automation is not supported in Azure MI which means I can't use sp_OACreate .
Has anyone else faced this issue? What alternatives are available that can be looked at please?

Thanks in advance

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KalyanChanumolu-MSFT avatar image
0 Votes"
KalyanChanumolu-MSFT answered

@MSProg-4478 Thank you for reaching out.

As you have rightly identified, OLE Automation is not available on Azure SQL Managed Instance.

For you use case, you can use Azure Data Factory with a HTTP Connector to call an external service/website via HTTP
Refer to the documentation here for step-by-step instructions

To send emails from an ADF pipeline, refer to the instructions here


If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.