July 15, 2008 at 2:50 am
HI all,
I build a simple job that failure....like SELECT * FROOOM table and in the notification introduce an operator (me).
Now I got enable database mail, try with e-mail test from MANAGMENT > DATABSEMAIL > SEN e-MAIL TEST.
This one arrive me successful, but on JOB failure never coming...
This is a problem 'cause I don't see the failure of importante tasks like back-up.
Some one can give me a feedback how I can correctly set-up database mail. I got 5 sqlserver instance and only one don't send me message.
Alen Italy
July 15, 2008 at 6:59 am
Did you create an operator and add this to the job?
July 15, 2008 at 7:06 am
yes naturally...
but seems no send anyway e-mail
I create a stupid job with an error like SELECT * FROM TAAABLE
July 15, 2008 at 7:29 am
Use this code to see all the mails generated by Database Mail. Perhaps the status will inform you for where to look.
USE msdb ;
GO
-- show a list of all mail-items
SELECT
sysmail_allitems.mailitem_id
, sent_status
, recipients
, subject, body
, send_request_date
, send_request_user
, sent_date
, sysmail_allitems.last_mod_date
, sysmail_event_log.event_type
, sysmail_event_log.description
FROM msdb.dbo.sysmail_allitems
LEFT OUTER JOIN msdb.dbo.sysmail_event_log
ON sysmail_allitems.mailitem_id = sysmail_event_log.mailitem_id
July 15, 2008 at 12:17 pm
Microsoft has a website for troubleshooting Database Mail
http://msdn.microsoft.com/nl-nl/library/ms188663(en-us).aspx
July 15, 2008 at 3:14 pm
I had something like this happen on one server. Found out that the e-mail address had been stored in the Operators data as "[email:myaddress@mycompany.com]" (names changed to protect something or other). I removed the brackets and the "email:", and the alerts started working.
Not sure why it stored the email address that way, but it did. Check for that kind of thing.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 15, 2008 at 11:58 pm
Can u just reply with what exact message you are getting when job fails and fails to send a mail.
July 16, 2008 at 8:30 am
Thks....sorry for my late.
This is the point.
If I try send e-mal via t-sql like
----
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'SQL Server Alert',
@recipients = 'me@xxx.it',
@importance = 'High',
@subject = 'is a test',
@body ='test',
@body_format = 'TEXT',
@query_result_header = 0,
@query_result_width = 1500
this is arrived and also if I try s send e-mail from "managment" folder.
The only one that not arrive me is from JOB notification process....
I try with failure, a success anda all.
Nothing arrived me.
The e-amil operator is absolutly correct.
SQL Server agent, alert system is on the right profile... I don't understand...
Hope some tip
July 16, 2008 at 10:37 am
Does the account SQL Agent is running under have the necessary rights to execute sp_send_dbmail? How about the account the job is running under (if that's different)?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 16, 2008 at 9:05 pm
Right-click on SQL Server Agent and go to Properties
Click on "Alert System" and make sure that the checkbox for "Enable Mail Profile" is checked - then select a suitable DB Mail profile.
Restart SQL Agent when ready
AFAIK - database mail may be working ok, but if SQL Agent isn't configured to use it then notifications won't be sent - then again I may be wrong 🙂
hope this helps
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply