question

AmardeepthiVenkataSiripurapu-9940 avatar image
0 Votes"
AmardeepthiVenkataSiripurapu-9940 asked OuryBa-MSFT commented

Calling API from Auze SQL Stored procedure

Can we call an endpoint from Azure SQL stored procedure.

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

OuryBa-MSFT avatar image
0 Votes"
OuryBa-MSFT answered OuryBa-MSFT commented

Hi @AmardeepthiVenkataSiripurapu-9940 Thank you for posting your question on Microsoft Q&A.
Unfortunately calling API from Azure stored procedure is not supported for PaaS (Azure SQL DB).

132081-image.png

If you need to do something similar, SQL Managed Instance has CLR (CLR is not supported in Azure SQL neither)
https://docs.microsoft.com/en-us/azure/azure-sql/database/features-comparison#features-of-sql-database-and-sql-managed-instance
https://docs.microsoft.com/en-us/sql/relational-databases/clr-integration/common-language-runtime-integration-overview?view=sql-server-ver15

Please feel free to reach out if you have additional queries.

Regards,
Oury




image.png (112.5 KiB)
· 4
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.

Thank you Oury! Can we use Logic Apps to call the endpoints as part of accomplishing business logic. We need to perform insert/update data on SQL tables based on endpoint data

Thanks
Deepthi

0 Votes 0 ·
OuryBa-MSFT avatar image OuryBa-MSFT AmardeepthiVenkataSiripurapu-9940 ·

Hi @AmardeepthiVenkataSiripurapu-9940
What kind of endpoint are you referring to. But mostly this ca be achieved from Azure logic App as well as Azure functions. Please check out this thread which is similar to your questions and let us know if that was helpful.
https://docs.microsoft.com/en-us/answers/questions/529464/upsert-in-azure-logic-app-to-load-data-into-azure.html

Regards,
Oury

0 Votes 0 ·

Thanks @OuryBa-MSFT ! This is helpful!
There are a few endpoints to fetch the data for getting current exchange rate, city codes etc based on which we may need to perform some calculations & load the data to Azure SQL tables. Also once the processing is done another http request need to be sent with the newly generated ids.

I believe the logic Apps would help in this scenario.

Thanks again!
Deepthi

1 Vote 1 ·
Show more comments