Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Executing stored procedures on SQL Azure database using REST API or Azure Management Libraries

Is there a way to create an execute stored procedures on SQL Azure database using REST API or Azure Management Libraries?

I checked Operations for Azure SQL Databases here http://msdn.microsoft.com/en-us/library/azure/dn505719.aspx and Management Libraries for .NET here http://msdn.microsoft.com/en-us/library/azure/dn602775(v=azure.11).aspx, and I don't see any options.

like image 900
myroslava72 Avatar asked Sep 07 '25 18:09

myroslava72


2 Answers

No, this is something you would need to do in your application. The REST API provides management capabilities at the infrastructure/platform level. Procedure execution would fall under application level IMHO. Management Library for .Net is simply a wrapper around these REST API.

I think your only option would be write your own API specific for your application/database that can execute the stored procedure in your database.

like image 131
Gaurav Mantri Avatar answered Sep 09 '25 17:09

Gaurav Mantri


Since you are developing in Azure consider automatic REST API from SlashDB, which is available from their Marketplace.

https://azuremarketplace.microsoft.com/en-us/marketplace/apps/vte.slashdb

It allows for defining an API end-point in Transact-SQL to call a stored procedure by way of an HTTP GET request to a URL with parameters. In addition to that, SlashDB reflects the entire database as URL-linked graph-like structure so a lot of queries need not even be written.

Disclosure: I am the founder and CEO of the company behind SlashDB, but you don't have to take my word it - just try it.

like image 43
Victor Olex Avatar answered Sep 09 '25 18:09

Victor Olex