Asked by:
IF DB Crash; How to send SMS to a mobile?

Question
-
Dear All;
I would like to know if there is any possibility to set a job that send the error messages from SQL SERVER to my mobile number incase of any error / job failed / job success /unexpected problems happens to a database?!?!?!
If there is any way.. please provide me with a document / tips / steps if you dont mind :)
Tuesday, March 29, 2011 7:30 AM
All replies
-
You can configure Database Mail as explained here and create an operator with the email/page email as the mobile number as explained here.
This is a good way to start.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Tuesday, March 29, 2011 12:41 PM -
Hi Pradeep;
Thanks for your answer .. Well I have set up an SQL Mail and operators since long time and iam recieving the alerts on my email everyday. But What I want is; to receieve these alerts on my mobile phone via SMS. However, i have tried what you have asked, but it didn't work . Don't you think that I should have something in the middle between SQL SERVER and my Mobile?? Something like SMS services maybe?!?!
- Edited by BuRaiR Wednesday, March 30, 2011 8:03 AM
Wednesday, March 30, 2011 7:34 AM -
Using most operators it is possible to send email to a mobile number. Suppose your number is 1234567890, the email address would be something like 1234567890@carrirername.com. You can mention this email address in the Operator properties and receive messages on your cellphone.
This approach works for me.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Wednesday, March 30, 2011 7:41 AM -
Hi Pradeep;
Thanks again .. Well still did not receieve anything in my mobile. What i have done is that:
- Created a new operator (TEST) and set the email address as: 123456@carrirename.com
- in the "jobs" side; I have set the "Notifications" as: Email: TEST
This is how i have done it .. Maybe my steps are wrong?
Wednesday, March 30, 2011 8:14 AM -
The email address varies from carrier to carrier. It may be .com for some and something else for others. Once you have the correct email address, sending the notification to mobile should be easy.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Wednesday, March 30, 2011 11:18 AM -
Have not done the email to mobile (will try) but we do ours through Database Mail. You have to be sure to set it up then go to SQL Server Agent, properties and Enable Database mail.
Pat
PatM RenoFriday, April 1, 2011 6:43 PM -
The email address varies from carrier to carrier. It may be .com for some and something else for others. Once you have the correct email address, sending the notification to mobile should be easy.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Hi Pradeep;Seems it's blocked or something .. I have tried it many times and also tried to change to different operators we have in the country but still ,, nothing happens. I dont know what's the problem .. Anyhow, thank you very much for the info.
Sunday, April 3, 2011 9:14 AM -
Have not done the email to mobile (will try) but we do ours through Database Mail. You have to be sure to set it up then go to SQL Server Agent, properties and Enable Database mail.
Pat
PatM Reno
Hi Pat,Yes , I know how to get it to my email .. but iam looking for SMS to mobile. You never know whta happens in weekends :) .. Thanks Anyway.
Sunday, April 3, 2011 9:15 AM -
Mine is just set up as an email address and works fine. I have Sprint so all I did was set up a new PatM-Mobile operator and for the pager email address, I put in the address 775nnnnnnn@messaging.sprintpcs.com (of course the n's are numbers but didn't want to post it). Works like a charm.
PatM Reno- Edited by PatM-Reno Monday, April 4, 2011 4:02 PM mistyped
Monday, April 4, 2011 4:01 PM -
The email address varies from carrier to carrier. It may be .com for some and something else for others. Once you have the correct email address, sending the notification to mobile should be easy.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Hi Pradeep:
Yup i know about that .. but still the same issue .. I start to have doubt that this service could be blocked by our telecommunication company? or maybe iam writing the wrong one.
Tuesday, April 19, 2011 7:01 AM -
Mine is just set up as an email address and works fine. I have Sprint so all I did was set up a new PatM-Mobile operator and for the pager email address, I put in the address 775nnnnnnn@messaging.sprintpcs.com (of course the n's are numbers but didn't want to post it). Works like a charm.
PatM Reno
Hi PatM Reno;for me stiull the same issue .. I mentioned tp pradeep above, that i have a doubt this type of services might be blocked by our operator .. maybe !! or maybe I got the wrong carrier name. Do u have a list of carriers or something like that?
Tuesday, April 19, 2011 7:04 AM -
Hi Pradeep:
Yup i know about that .. but still the same issue .. I start to have doubt that this service could be blocked by our telecommunication company? or maybe iam writing the wrong one.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Tuesday, April 19, 2011 1:31 PM -
one thing you could try. Send yourself and email from your phone and you can see the format of the carrier. Maybe your phone doesn't do email but I can't imagine that's the case since I have it. I'm always a little behind on the phone stuff.
Pat
PatM RenoTuesday, April 19, 2011 5:56 PM -
That is also a possibility. But usually the carriers don't block it. You may want to get in touch with them regarding this.
Actually here they block what they want .. depend on their mood .. loool
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @PradeepAdiga
Wednesday, April 27, 2011 5:20 AM -
one thing you could try. Send yourself and email from your phone and you can see the format of the carrier. Maybe your phone doesn't do email but I can't imagine that's the case since I have it. I'm always a little behind on the phone stuff.
Pat
PatM Reno
Hi Pat,Sending an email form my phone was a good idea to identify the carrier name. But still did not solve my issue. Can you please confirm if iam doing the right thing:
- Created a new operator (TEST) and set the email address and pager as: 123456@carrirename.com
- in the "jobs" side; I have set the "Notifications" as: Email: TEST
NOTE: carrier name has been set according to the local operators here.
Wednesday, April 27, 2011 5:25 AM -
How about a really simple way to do this using a service called Twilio.
Check these two links out for more information on making telephone calls and sending text messages from a single line of SQL code.
Wednesday, November 30, 2011 4:36 AM