February 7, 2012 at 5:55 am
Hello , i'm working on solution to know if a record added to a tabe in MSSQL 2008 , give me alarm that i can send For example sms or email to custome.
i dont have access to source of that program ,that i can write tranaction , ... to do that .
how i can do it ?
Thank's for you'r help
February 7, 2012 at 6:50 am
I would recommend you to explore Triggers to send the alerts.
That way you don't have to worry about the source code of that program that is trying to update / insert data into your table.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
February 7, 2012 at 7:11 am
would you please put example , how to do that ? SMS application is another program , how i can tell it to send sms ?
February 7, 2012 at 7:20 am
Log the alerts in some tables via triggers. Create a job to scan for new records periodically. If you find new records, call the sms application (third party).
February 7, 2012 at 7:21 am
I don't have script ready to give you..
Read the below topics (links) they will give you an idea what I was suggesting to..
http://forums.asp.net/t/1724525.aspx/1
http://www.datasprings.com/resources/articles-information/creating-email-triggers-in-sql-server-2005
And about the sms application you have, it is not possible for someone other than you, to say what needs to be done. You will have to check with that sms application vendors to check how you can initiate an sms, if they say that you will have to insert a row into xyz table of abc database, then you will have to write code / scripts to automate that..
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
February 7, 2012 at 2:18 pm
Also bear in mind that with most carriers you can actually email the SMS number directly (example for US T-Mobile customers you can email xxxxxxxxxx@tmomail.net which will send the SMS to the users phone)
February 7, 2012 at 10:19 pm
what is service broker in sql2008 ? can i do that with it ?
February 7, 2012 at 10:51 pm
You can configure email alerts for this.
And you can use free web services that can sms the emails arrived.
Sagar Sonawane
** Every DBA has his day!!:cool:
February 7, 2012 at 11:06 pm
is it possible some one Describe Service Broker shortly and put some example here ?
February 8, 2012 at 9:02 am
Overview (Service Broker)
February 12, 2012 at 1:27 am
what is the best method to deploy this issue ? Trigger ? Notification oR Broker ?
February 12, 2012 at 2:07 am
Service Broker is a big chapter in itself so if you are interested in learning something new, please use it. It’s very good utility in SQL Server.
Trigger approach would be comparatively easy. Also if you are worried about your solution’s support & maintenance; many developers in your team will be able to support trigger approach.
February 12, 2012 at 3:48 am
Have you considered and investigated Query Notifications?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply