July 24, 2013 at 3:27 am
Hi everyone,
i've got a problem with the agent.
I've create a procedure to check the memory and, in case is too low, to send an alert via sp_send_dbmail,
this procedure works if I execute it manually, but when I start the job via agent, nothing happens, no error, no mail, nothing.
it is my understanding that the only difference is the user that start the procedure, but both are sysadmin.
The job success with no error, have u got any ideas about the solution?
many thanks!!! 🙂
July 24, 2013 at 3:40 am
Are there rows entered in the [sysmail%] tables?
-- show a list of all mailed 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
order by
send_request_date desc
July 24, 2013 at 3:48 am
the sent_status is "failed" in all the rows about the agent's attempts, and the description of the error is the following:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2013-07-24T11:41:12). Exception Message: Could not write to temp attachment file. (Illegal characters in path.). )
does it mean that i can't send the query result in the attachment file? i'll try to find out,
many thanks,
it really helps!!!
July 24, 2013 at 3:56 am
Try to see how the filename of the attachment is detemined. I guess the attachment will be named according to the alert name. Probably there is an illegal character (like a "\" or "/") that can't be used inside a filename.
July 24, 2013 at 4:08 am
Hey hi there.
I have been looking for the same thing..... need a procedure to check memory and alert me when memory is low.
Please can you post here that SP?
Thanx in advance.
July 24, 2013 at 4:09 am
yes I used the illegal character "Ã "
now it works!!
thanks a lot!! :-D:-D
July 24, 2013 at 4:12 am
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply