We are looking for a way to call a REST service from a SQL Server 2008 & newer stored procedure. We do not need to get any information from this service. We just need to force the call to run in the middle of a stored procedure.
I have found some 3rd party options or CLR; but I refuse to think there isn't an easier way since we just need to fire a call and don't need anything in return.
Hopefully someone can shed some light. Thanks!
You could make a SQL Agent job to run a PowerShell script, then run the job via msdb.dbo.sp_start_job
. That way you wouldn't need any external scripts or utilites, nor any SQL-CLR.
Your job step would be something like:
$request = [System.Net.WebRequest]::Create('http://stackoverflow.com/')
$result = $request.GetResponse()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With