Showing posts with label emails. Show all posts
Showing posts with label emails. Show all posts

Monday, March 26, 2012

Problems with SQL 2005 64bit sending emails

I have SQL 2005 on WS 2003 64 bit
Whenever SQL agent is trying to send an email, it fails and I get this
error message in logs:
[264] An attempt was made to send an email when no email session has
been established
If I run the test email manually is working correctly. If I try to
send email using msdb.dbo.sp_send_dbmail is working correctly. If I
run manually a service intregation package that is sending the email is
running correctly.
But if I try to run a service integration package thats sending email
through a SQL Agent Job, then it fails with previous error message.
I have the same error when attempting to send a message on an alert with
SQLAgent, although test mails work fine. I found a reference to this on
Google Groups:
http://groups.google.com/group/micro...8aea3b8f3ac1f0
but no resolution...
"marian@.dumitrascu.net" <md@.dumitrascu.net> wrote in message
news:1143045307.345110.165550@.u72g2000cwu.googlegr oups.com...
> I have SQL 2005 on WS 2003 64 bit
> Whenever SQL agent is trying to send an email, it fails and I get this
> error message in logs:
> [264] An attempt was made to send an email when no email session has
> been established
> If I run the test email manually is working correctly. If I try to
> send email using msdb.dbo.sp_send_dbmail is working correctly. If I
> run manually a service intregation package that is sending the email is
> running correctly.
> But if I try to run a service integration package thats sending email
> through a SQL Agent Job, then it fails with previous error message.
>
|||Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
editions. See http://support.microsoft.com/kb/908360/en-us
I do wish they will fix this, but it does not look like it made it in
SP1.
Kevin
|||"Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
news:1143130284.972295.178130@.e56g2000cwe.googlegr oups.com...
> Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> editions. See http://support.microsoft.com/kb/908360/en-us
> I do wish they will fix this, but it does not look like it made it in
> SP1.
> Kevin
>
*sigh* All these little things that seem to be missing when you want to use
64-bit are most annoying. (Not just talking about SQL Server)

Problems with SQL 2005 64bit sending emails

I have SQL 2005 on WS 2003 64 bit
Whenever SQL agent is trying to send an email, it fails and I get this
error message in logs:
[264] An attempt was made to send an email when no email session has
been established
If I run the test email manually is working correctly. If I try to
send email using msdb.dbo.sp_send_dbmail is working correctly. If I
run manually a service intregation package that is sending the email is
running correctly.
But if I try to run a service integration package thats sending email
through a SQL Agent Job, then it fails with previous error message.I have the same error when attempting to send a message on an alert with
SQLAgent, although test mails work fine. I found a reference to this on
Google Groups:
[url]http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thr
ead/de66aea413263523/c28aea3b8f3ac1f0?lnk=st&q=%22An+attempt+was+made+to+send+an+e
mail+when+no+email+session+has+been+esta
blished%22&rnum=1&hl=en#c28aea3b8f3ac1f0[/
url]
but no resolution...
"marian@.dumitrascu.net" <md@.dumitrascu.net> wrote in message
news:1143045307.345110.165550@.u72g2000cwu.googlegroups.com...
> I have SQL 2005 on WS 2003 64 bit
> Whenever SQL agent is trying to send an email, it fails and I get this
> error message in logs:
> [264] An attempt was made to send an email when no email session has
> been established
> If I run the test email manually is working correctly. If I try to
> send email using msdb.dbo.sp_send_dbmail is working correctly. If I
> run manually a service intregation package that is sending the email is
> running correctly.
> But if I try to run a service integration package thats sending email
> through a SQL Agent Job, then it fails with previous error message.
>|||Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
editions. See http://support.microsoft.com/kb/908360/en-us
I do wish they will fix this, but it does not look like it made it in
SP1.
Kevin|||"Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> editions. See http://support.microsoft.com/kb/908360/en-us
> I do wish they will fix this, but it does not look like it made it in
> SP1.
> Kevin
>
*sigh* All these little things that seem to be missing when you want to use
64-bit are most annoying. (Not just talking about SQL Server)|||Well now that SP1 is out, it appears to be working on x64!
"Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> editions. See http://support.microsoft.com/kb/908360/en-us
> I do wish they will fix this, but it does not look like it made it in
> SP1.
> Kevin
>|||You know, its weird I am on 64 bit too, the maintenance plans send email, db
mail is config properly and can send a test email, but all sql jobs I set up
cannot send any notification with the same error listed here -
--
John F.
"Michael D'Angelo" wrote:

> Well now that SP1 is out, it appears to be working on x64!
> "Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
> news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
>
>|||What do you mean working? We have sp1 and I haven't been able to get this to
work using database mail OR SQL Mail. The KB article is messed up b/c it say
s:
Note If this option is not available, enable SQL Server Agent Mail by using
the Surface Area Configuration tool, and then use the Surface Area
Configuration tool to set up a mail profile .
Well, there is nothing that I see called SQL Server Agent Mail in SAC (I'm
assuming that they mean SQL Mail). PLUS, there's nothing that I see in SAC
for setting up a mail profile (I think that this is done using Outlook
Express). It also doesn't tell you that you have to be logged on to the
server as the service account when setting up the mail profile (I'm pretty
sure that's true). Anyway, this article has too many things that might not b
e
exactly correct that I'm not sure if I'm missing something or if I have some
other problem.
Looking for help!
Michelle
"Michael D'Angelo" wrote:

> Well now that SP1 is out, it appears to be working on x64!
> "Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
> news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
>
>|||The article also neglects to mention that you have to restart the sql server
agent service after assigning the profile for it to use. That's what worked
for me for BOTH SQL Mail and Database Mail. So, I guess that was my problem
all along. BOL doesn't mention restarting the agent service in the How to:
Configure SQL Server Agent Mail to Use Database Mail. I don't think that I
had to restart the service on the 32-bit machine. Who knows...Anyway,
database mail DOES seem to work on 64-bit machines with Agent and sp1. That
KB Article really needs to be cleaned up, though.
"Michelle" wrote:
[vbcol=seagreen]
> What do you mean working? We have sp1 and I haven't been able to get this
to
> work using database mail OR SQL Mail. The KB article is messed up b/c it s
ays:
> Note If this option is not available, enable SQL Server Agent Mail by usin
g
> the Surface Area Configuration tool, and then use the Surface Area
> Configuration tool to set up a mail profile .
> Well, there is nothing that I see called SQL Server Agent Mail in SAC (I'm
> assuming that they mean SQL Mail). PLUS, there's nothing that I see in SAC
> for setting up a mail profile (I think that this is done using Outlook
> Express). It also doesn't tell you that you have to be logged on to the
> server as the service account when setting up the mail profile (I'm pretty
> sure that's true). Anyway, this article has too many things that might not
be
> exactly correct that I'm not sure if I'm missing something or if I have so
me
> other problem.
> Looking for help!
> Michelle
> "Michael D'Angelo" wrote:
>|||What do you mean working? We have sp1 and I haven't been able to get this to
work using database mail OR SQL Mail. The KB article is messed up b/c it say
s:
Note If this option is not available, enable SQL Server Agent Mail by using
the Surface Area Configuration tool, and then use the Surface Area
Configuration tool to set up a mail profile .
Well, there is nothing that I see called SQL Server Agent Mail in SAC (I'm
assuming that they mean SQL Mail). PLUS, there's nothing that I see in SAC
for setting up a mail profile (I think that this is done using Outlook
Express). It also doesn't tell you that you have to be logged on to the
server as the service account when setting up the mail profile (I'm pretty
sure that's true). Anyway, this article has too many things that might not b
e
exactly correct that I'm not sure if I'm missing something or if I have some
other problem.
Looking for help!
Michelle
"Michael D'Angelo" wrote:

> Well now that SP1 is out, it appears to be working on x64!
> "Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
> news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
>
>|||The article also neglects to mention that you have to restart the sql server
agent service after assigning the profile for it to use. That's what worked
for me for BOTH SQL Mail and Database Mail. So, I guess that was my problem
all along. BOL doesn't mention restarting the agent service in the How to:
Configure SQL Server Agent Mail to Use Database Mail. I don't think that I
had to restart the service on the 32-bit machine. Who knows...Anyway,
database mail DOES seem to work on 64-bit machines with Agent and sp1. That
KB Article really needs to be cleaned up, though.
"Michelle" wrote:
[vbcol=seagreen]
> What do you mean working? We have sp1 and I haven't been able to get this
to
> work using database mail OR SQL Mail. The KB article is messed up b/c it s
ays:
> Note If this option is not available, enable SQL Server Agent Mail by usin
g
> the Surface Area Configuration tool, and then use the Surface Area
> Configuration tool to set up a mail profile .
> Well, there is nothing that I see called SQL Server Agent Mail in SAC (I'm
> assuming that they mean SQL Mail). PLUS, there's nothing that I see in SAC
> for setting up a mail profile (I think that this is done using Outlook
> Express). It also doesn't tell you that you have to be logged on to the
> server as the service account when setting up the mail profile (I'm pretty
> sure that's true). Anyway, this article has too many things that might not
be
> exactly correct that I'm not sure if I'm missing something or if I have so
me
> other problem.
> Looking for help!
> Michelle
> "Michael D'Angelo" wrote:
>sql

Problems with SQL 2005 64bit sending emails

I have SQL 2005 on WS 2003 64 bit
Whenever SQL agent is trying to send an email, it fails and I get this
error message in logs:
[264] An attempt was made to send an email when no email session has
been established
If I run the test email manually is working correctly. If I try to
send email using msdb.dbo.sp_send_dbmail is working correctly. If I
run manually a service intregation package that is sending the email is
running correctly.
But if I try to run a service integration package thats sending email
through a SQL Agent Job, then it fails with previous error message.I have the same error when attempting to send a message on an alert with
SQLAgent, although test mails work fine. I found a reference to this on
Google Groups:
http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/de66aea413263523/c28aea3b8f3ac1f0?lnk=st&q=%22An+attempt+was+made+to+send+an+email+when+no+email+session+has+been+established%22&rnum=1&hl=en#c28aea3b8f3ac1f0
but no resolution...
"marian@.dumitrascu.net" <md@.dumitrascu.net> wrote in message
news:1143045307.345110.165550@.u72g2000cwu.googlegroups.com...
> I have SQL 2005 on WS 2003 64 bit
> Whenever SQL agent is trying to send an email, it fails and I get this
> error message in logs:
> [264] An attempt was made to send an email when no email session has
> been established
> If I run the test email manually is working correctly. If I try to
> send email using msdb.dbo.sp_send_dbmail is working correctly. If I
> run manually a service intregation package that is sending the email is
> running correctly.
> But if I try to run a service integration package thats sending email
> through a SQL Agent Job, then it fails with previous error message.
>|||Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
editions. See http://support.microsoft.com/kb/908360/en-us
I do wish they will fix this, but it does not look like it made it in
SP1.
Kevin|||"Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> editions. See http://support.microsoft.com/kb/908360/en-us
> I do wish they will fix this, but it does not look like it made it in
> SP1.
> Kevin
>
*sigh* All these little things that seem to be missing when you want to use
64-bit are most annoying. (Not just talking about SQL Server)|||Well now that SP1 is out, it appears to be working on x64!
"Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> editions. See http://support.microsoft.com/kb/908360/en-us
> I do wish they will fix this, but it does not look like it made it in
> SP1.
> Kevin
>|||You know, its weird I am on 64 bit too, the maintenance plans send email, db
mail is config properly and can send a test email, but all sql jobs I set up
cannot send any notification with the same error listed here -
--
John F.
"Michael D'Angelo" wrote:
> Well now that SP1 is out, it appears to be working on x64!
> "Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
> news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> > Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> > editions. See http://support.microsoft.com/kb/908360/en-us
> >
> > I do wish they will fix this, but it does not look like it made it in
> > SP1.
> >
> > Kevin
> >
>
>|||What do you mean working? We have sp1 and I haven't been able to get this to
work using database mail OR SQL Mail. The KB article is messed up b/c it says:
Note If this option is not available, enable SQL Server Agent Mail by using
the Surface Area Configuration tool, and then use the Surface Area
Configuration tool to set up a mail profile .
Well, there is nothing that I see called SQL Server Agent Mail in SAC (I'm
assuming that they mean SQL Mail). PLUS, there's nothing that I see in SAC
for setting up a mail profile (I think that this is done using Outlook
Express). It also doesn't tell you that you have to be logged on to the
server as the service account when setting up the mail profile (I'm pretty
sure that's true). Anyway, this article has too many things that might not be
exactly correct that I'm not sure if I'm missing something or if I have some
other problem.
Looking for help!
Michelle
"Michael D'Angelo" wrote:
> Well now that SP1 is out, it appears to be working on x64!
> "Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
> news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> > Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> > editions. See http://support.microsoft.com/kb/908360/en-us
> >
> > I do wish they will fix this, but it does not look like it made it in
> > SP1.
> >
> > Kevin
> >
>
>|||The article also neglects to mention that you have to restart the sql server
agent service after assigning the profile for it to use. That's what worked
for me for BOTH SQL Mail and Database Mail. So, I guess that was my problem
all along. BOL doesn't mention restarting the agent service in the How to:
Configure SQL Server Agent Mail to Use Database Mail. I don't think that I
had to restart the service on the 32-bit machine. Who knows...Anyway,
database mail DOES seem to work on 64-bit machines with Agent and sp1. That
KB Article really needs to be cleaned up, though.
"Michelle" wrote:
> What do you mean working? We have sp1 and I haven't been able to get this to
> work using database mail OR SQL Mail. The KB article is messed up b/c it says:
> Note If this option is not available, enable SQL Server Agent Mail by using
> the Surface Area Configuration tool, and then use the Surface Area
> Configuration tool to set up a mail profile .
> Well, there is nothing that I see called SQL Server Agent Mail in SAC (I'm
> assuming that they mean SQL Mail). PLUS, there's nothing that I see in SAC
> for setting up a mail profile (I think that this is done using Outlook
> Express). It also doesn't tell you that you have to be logged on to the
> server as the service account when setting up the mail profile (I'm pretty
> sure that's true). Anyway, this article has too many things that might not be
> exactly correct that I'm not sure if I'm missing something or if I have some
> other problem.
> Looking for help!
> Michelle
> "Michael D'Angelo" wrote:
> > Well now that SP1 is out, it appears to be working on x64!
> >
> > "Kevin Madsen" <kevin.madsen@.gmail.com> wrote in message
> > news:1143130284.972295.178130@.e56g2000cwe.googlegroups.com...
> > > Unfortunately SQLAgent cannot use dbmail as an alerting option in x64
> > > editions. See http://support.microsoft.com/kb/908360/en-us
> > >
> > > I do wish they will fix this, but it does not look like it made it in
> > > SP1.
> > >
> > > Kevin
> > >
> >
> >
> >

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

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