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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Email Setup

Status
Not open for further replies.

SQLBaby

IS-IT--Management
Jan 3, 2003
158
0
0
US
I am trying to setup EMAIL on SQL Server, when the job run it send me email about the status of job, i do not know how to configure it and how to link with my email account, any body have solution for that please...?

Knowledge is a key of success.



 
Install Outlook on the server. Setup outlook under the NT Account that the SQL Server runs as.

In enterprise manager right click on the server, and click properties. Server settings tab. Select the mail profile from the list. You may need to restart the service to get it to see the mail profile. You also need to tell sql agent to use the mail profile.

Your job can now send you an email.

Denny
 

Thanks for your kind reply.

Outlook is already installed on server.

Setup outlook under the NT Account that the SQL Server runs as what does it mean...? how i do this, actualy i never never configure outlook before. If you give me some hints or steps, it will be much easier for me.

Knowledge is a key of success.



 
I just submitted a FAQ on this, but it hasn't been published yet.

Here is the text I submitted. It's a bit more detailed then my first post. If you have any more questions, just let me know. I'll be happy to answer them to the best of my ability.

Log into the SQL Server with an account that has Administrator privileges on the server.
Install Outlook.
Log into the SQL Server with the NT Account that the server is running as.
Configure an outlook profile (you will need a mailbox on your exchange server for the SQL Server to use).
Open Enterprise Manager, and navigate to the server that you are configuring.
Right click on the server and select properties.
Click on the “Server Settings” tab.
In the SQL Mail section click change, and select the profile that you just configured from the drop down menu. (If it is not listed, or the drop down list is empty, you will need to stop and restart the SQL Service).
Once you have the Outlook profile selected, click ok. Then click ok to close the SQL Server Properties.


To configure SQL Agent, click the plus next to the server, and the plus next to Management.
Right click on SQL Server Agent, and click properties.
On the general tab, in the Mail Session section, select the Outlook profile in the dropdown. Click Test then OK. If prompted to restart the Agent, click yes.

Your SQL Server is now configured to send mail.


Denny
 
Hi Denny,

I have a question on a similar subject and while searching for an answer found this posting - maybe you can help ?

I have SQL Mail working just fine, notifying of scheduled Stored Procedures failing and sending spreadsheet or csv enclosures to customers etc.

I'd like to set it up to notify me only if scheduled maintenance jobs fail. So I go into the properties of the job & set it up for email notification "on job failure" & it emails me every time the job runs not just when it fails (in fact the jobs have never failed, which is why I want notification if it ever happens).

Any ideas ?

Paul
 
Sounds like you might be getting the sqlmaint report mailed to you. What's the subject of the email that you are getting?

Denny

Between the ESP=ON and the RUM (Read Users Mind) upgrade, I'm ready to go.
 
Hi Denny,

Because it was sending so many "wrong" messages I've turned them all off. I'll set some to Notify for tonight's maintenance jobs and let you know tomorrow.

Cheers,

Paul
 
Hi Denny,

Sorry it's taken a few days to respond again.

It's taken until now to get a failure, but the message worked just fine.

And as for the messages when maintenance jobs are working successfully ... they've disappeared !!

I have no idea what's different, but hopefully all is OK now.

Thanks for your interest,

Cheers,

Paul

 
no problem.

Denny

Between the ESP=ON and the RUM (Read Users Mind) upgrade, I'm ready to go.
 
I have a similar problem but it will require a different solution I'am sure. Need to set up SQL to email a third party to notify him of the status of scheduled SQL backups. Only thing is we are running Domino 6.0 Server not exchange. Can this be done?
 
It should be able to. As long as Outlook can connect to the Domaino server you should be ok. Not sure though, I've never tried it.

If not, download xp_smtp_sendmail and write some custom scripts into the job to send emails if the backup fails.

Denny

--Anything is possible. All it takes is a little research. (Me)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top