SQL Server
(1)
Backup
(1)
Report
(1)
SMTP
(1)
Database
(1)
F27be94a
(1)
Ad7d
(1)
A1c3
(1)

SQL 2005 Service Broker -- report a job which hangs

Asked By sweetpotato
16-Feb-08 03:48 AM
Hello,

I am new to SQL 2005. I heard that there is something called Service
Broker in SQL 2005 which can send out email to operator if a job
hangs.

Basically, I would like to know how this works and how I can setup
something like this so that when a job hangs it will report to
operator about the incompleted job.

Please advice and thanks in advance. Your help would be greatly
appreciated.

Search Books Online for "Database Mail".

Asked By Tibor Karaszi
14-Feb-08 03:49 PM
Search Books Online for "Database Mail". This is the new SMTP based mail functionality (which also
Agent can use). It can alert an operator if a job fails, but not (at least directly if the job hangs
(if you by hang mean never completes).

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi

When I said the job hangs, I mean a step in the job is not completed.

Asked By sweetpotato
16-Feb-08 03:48 AM
When I said the job hangs, I mean a step in the job is not completed.
Say for example, if it run an exe and the exe never completes. I
wonder if there is anything in SQL Server which will send email to
operator if a job doesn't complete in a certain period of time.

Thanks

On Feb 14, 3:49=A0pm, "Tibor Karaszi"
unctionality (which also
directly if the job hangs

I'm afraid not. Who would decide when a certain time period is "too long"?

Asked By Tibor Karaszi
15-Feb-08 02:30 PM
I'm afraid not. Who would decide when a certain time period is "too long"? 5 minutes? 5 hours? 5
minutes might be too long for something which should be very quick, while 5 hours is not enough for
a large backup.

There could be some functionality where you could specify a limit for the job and Agent will warn
you if this limit is exceeded. But I'm afraid there isn't. Considering wishing for it at
connect.microsoft.com.

You can roll your own of course. I.e. write code that regularly check your jobs and see if its still
executing and have your own limits.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


When I said the job hangs, I mean a step in the job is not completed.
Say for example, if it run an exe and the exe never completes. I
wonder if there is anything in SQL Server which will send email to
operator if a job doesn't complete in a certain period of time.

Thanks

On Feb 14, 3:49 pm, "Tibor Karaszi"
Post Question To EggHeadCafe