-2

We use OLE Automation methods such as SP_OAmethod, Sp_Oacreate, etc.. to send SMS to users from SQL Server. I wish to stop use OLE Automation. Is there any alternate way to send SMS?

1
  • Add what you've researched and tried to your question or your question will likely be closed. Commented Mar 1, 2024 at 13:10

1 Answer 1

2

Is there any way to send SMS without OLE Automation?

You can write your own C# solution using CLR and deploy it to SQL Server, such as a CLR procedure. Doing so will allow you to (either directly or indirectly via web service calls) leverage other already built frameworks for sending out SMS messages.

CLR is a rather standard way to implement logic that is outside the scope of T-SQL, that can be executed within SQL Server via T-SQL code, stored within T-SQL-like objects.

4
  • 1
    But why do it from SQL Server at all? Why not do it from some C# client app, or from a Powershell script? Commented Mar 2, 2024 at 20:36
  • @Charlieface Good questions for OP eh? 😉 Commented Mar 3, 2024 at 18:40
  • @J.D. Thank you for your Solution, Well Actually I'm a DBA, I am not sure how C# developers use sp_OAmethod to send SMS. I'll inform this to C# Developers to change their code. Commented Mar 4, 2024 at 4:53
  • @dbajayy "I am not sure how C# developers use sp_OAmethod to send SMS." - They don't. Instead, they can send SMS messages in C# through a multitude of other methods, that are easier and more resilient to code with. But depending on how it's coded, the C# code can essentially be deployed as its own stored procedure on SQL Server, if that's where you need to execute the code from. Commented Mar 4, 2024 at 13:44

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.