Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Agent Job Notifications won't send

Status
Not open for further replies.

RRinTetons

IS-IT--Management
Jul 4, 2001
333
US
SQL Server 2008 R2

I have a test job with 3 steps.

Step 1 generates a success or a fail

Step 2 uses sp_send_dbmail to send a success email

Step 3 uses sp_send_dbmail to send a failure email

That all works fine.

I'd LIKE to just use the job notification system, but for whatever reason it won't send. To test, I disable the steps 2 & 3 and enable the job notification. I've got an Operator with the same email address used in the db_send_mail steps, so I know that part works, but it just never sends. I've checked the mail queues and it never even shows up.

I thought job notifications basically just use db_send_mail? Any suggestions on what I've missed?

-
Richard Ray
Jackson Hole Mountain Resort
 
What errors is the job giving? Check the job history (right click on the job, select History. Expand the steps). You can also set up an output for the errors... Open up the job, go to the step and then the advanced tab. Have it either log to a file or to a table.


-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
No errors. This is an ENTIRELY manufactured test. The job is doing NOTHING except succeeding or failing. All I'm trying to do is get a notification. Step 1 of the job complete successfully and sends the message from my call ib Step 2, or fails (because I forced it to) and sends the message in Step 3.

When I enable notification and disable my db_send_mail calls the jobI still succeeds or fails the same way, I just don't get any notification.

.

-
Richard Ray
Jackson Hole Mountain Resort
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top