Friday, March 9, 2012

Problems with email alerts

Hi,

I hope I am posting this in the correct forum. I want to have emails sent to me when ever there is a declined login. I have set this up but it is not working. I will go through the procedure I used, and please tell me what I am missing. I am using SQL Server 2005.

First, under Management --> Database Mail in the object explorer, I run the Database Mail Configuration Wizard. I gave the account a name, an email address, a reply address, a server name (I used the IP address) and port number 25.

Second, under Management --> Database Mail in the object explorer, I selected Send Test Email. I choose the profile I just created, my own email address in the To section and left the Subject and Body sections as the default. This email arrives in my inbox, so I believe the mail account is configured correctly.

Third, under Notification Services --> Operators in the object explorer, I add a new operator. I give it a name, select enabled and give it an email address.

The last step, under Notification Services --> Alerts in the object explorer, I add a new alert. I give it a name, select for "<all databases>", and severity I select "014 - Insufficient Permission". Under the response tab I select "Notify Operators" and select the new operator and click the email checkbox for the operator.

Then I test the process by trying to login to my server with the wrong password. I never recieve an email alerting me.

If I go to the properties of the alert, under the history tab, I can see the date of the last alert is current, and for every attempt I login with the wrong password the number of occurances goes up.

If I go to the properties of the operator, under the history tab, it says "(Never e-mailed)"

Please tell me what I am missing?

Are the SQL Server and SQL Server Agent accounts set up as users, or are they using the LocalSystem or NetworkSystem accounts? You'll want to make sure both are normal user accounts, so that they can access the SMTP Server you're using.

Also, you need to configure the mail to use stored procedures...check out this link:

http://www.databasejournal.com/features/mssql/article.php/3626056

Buck Woody

|||

Hi,

I followed the article and I was missing one step, that of creating a profile. I had only created an account. However the alert is still not sending me email.

I then checked the SQL Server and SQL Server Agent services and both are using Local System accounts to log on. I change this to my domain user account and I get an error message when I try to start the service. "The service did not strat due to a logon failure". I then created a new user account on my pc, and gave it administrator rights. This also gives me the same error when I try to start the service using this local account.

It seems I can only use Local System, Local Service and Network Service to start these services.

|||

It seems like you're missing a permission or right on that account, although if it is an administrator that wouldn't be true. Try your domain account again, and make sure your account has all the rights needed to start the service as described in Books Online.

Buck Woody

No comments:

Post a Comment