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

error 22022

Status
Not open for further replies.

joeythelips

IS-IT--Management
Aug 1, 2001
305
IE
Hi,

i am trying to configure my sql server to email me when a maintenance plan finishes. I installed outlook client on the server, can open the mail box, but when i go to the properties of the operator i have setup and pick a name from out outlook list, and click test, i get the following error:

error 22022:sqlserver agent error. The SQLSERVERAgent Mail session is not running; check the mail profile and/or the sqlserver agent service startup account.

The mail profile is fine and the sqlserver agent service is started so i am a little bit stumped at the moment.

Anyone any ideas?

Joe
 
Hi Joe

One sure way to get this working is to have an account with Domain Admin permissions for your network etc. and it should also be given a valid MAPI profile so that it can be used to send and receive emails.

The account can then be configured as the startup account for the MSSQLSERVER and SQLSERVERAGENT services and put into the SQL Mail Configuration as the required profile name.

Then re-boot the server so that the account starts the services.

Only drawback is to remember to change the all the passwords held separately against the service start ups should the password need to be be changed in the future.

Hope this helps
Dave
 
Hi Dave.

i log onto the sql server as administrator but have the outlook configured for my own email account.

Is that what is causing the problem then?

Joe
 
Yes that is the problem. You need to log in to the machine with the account that the SQL Server logs in as, and configure the email that way. Here's a FAQ on setting up SQL to use Outlook to send and receive mail. faq962-4452

Never setup your SQL Account to run under an account with Domain Administrator permissions. This is way more permissions than SQL Servers needs. The idea behind domain based security is to give each account the minimum permissions needed to do it's job. SQL Server only needs to be a domain user to function. It doesn't even need to be an admin on the server it self to function correctly.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
Hi Denny
Thanks for answering Joe's question for me.
I agree that it is best practice to setup the SQL Account without Domain Administrator permissions. My initial response to Joe was by way of a favourite quick and dirty problem fix that is guaranteed to work.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top