[264] An attempt was made to send an email when no email session has been established
is the error I get when I try to send mail on the database.
It is a SQL Server 2005 Standard edition. I have configured database mail and tested it and it works there, then I configured a database operator. then I just created a test job to notify the operator of the job completion, and the email fails.
Any ideas?
Ryk
Have you gotten a respone or found out why you where having the problem. Im currently having the same issue.|||I have the same issue.|||I think I found the solution. I restart the SQL agent and the notification finally works now.|||Are you using RTM version ?
It should not require to restart SQLAgent. Let me follow up on this and if this is the case we will try to get this address in future release.
Thanks,
Gops Dwarak
|||I am running WorkGroup edition full verison and am getting this error.
After restarting the SQLAgent it works.
|||Hi,I had the same problem running SQL Server 2005 Standard Edition on Windows Server 2003 SP1 Standard Edition.
I did the following:
1. Installed/Configured Database Mail.
2. Setup SQL Server Agent to use the Profile under the alert system tab.
3. Created an operator.
4. Created a job that would fail (select * from from tblBlah), and set to email my operator on failure.
Got the error listed above.
After numerous atttempts
5. Restarted SQL Server Agent.
Now it works :-)
Cheers
John|||
Hi,
I'm running SQL 2005 enterprise edition on Windows 2003 SP1.
I have restarted many times the Server Agent or resinstalled the database mail but I still have the same problem. But when I use the stored procedure " xp_sendmail" I have no problem. The email is sent. All tests are successfull. When I run a job no email is sent to the operator . It doesn't works. Please tell me where is the problem?
|||Gops,
Just curious if you have heard anything else regarding this issue?
I have run into a similar problem running SQL Server 2000 sp3 on Win Server 2003 sp1.
I had setup email properly, it was sending emails and then suddenly stopped. After restarting the SQLAgent, the email began to work properly again with making no changes to any system settings.
Thanks,
David.
|||You also have to enable mail profile located in the properties of the SQL Agent, Alert System.|||SQL Mail for SQL 2000 is VERY different that Database Mail for SQLServer 2005. We intermittently have issues with SQL Mail and I'm not
surprised that restarting the agent service resolved the issue (at
least temporarily!).
Michelle|||I had the same problem. 64-bit, Enterprise Edition sp2 on Windows 2003
sp1. At first I thought that sp1 didn't really fix database mail for
this configuration and I tried to use the KB article explaining how to
set up sql mail but it had some mistakes. When that didn't work either
- I restarted the sql server agent, they both worked, and I scrapped
sql mail in favor of database mail.
Michelle|||
I have SQL 2005 Std SP1 on Windows Server 2003 SP1. Setup Database Mail, tested OK, was able to send mail using sp_send_dbmail. I have same problem that the the notification email was not sent out when a job is completed. In Database Mail Log it had a message:
[264] An attempt was made to send an email when no email session has been established
Also in Property of SQL Agent, when I enabled mail profile the Test button was grayed out. I think it was not appliable for DB mail but just wanted to check if this is right.
I have tried to disable and eable Database Mail couple times, restarted SQL Agent, restarted SQL server. There was no help. I searched and found that a lot of people having this kind of problem and so far no real fix for it. Restarting SQL Agent doesn't help for me. I don't want to go back to SQLMail but Database mail is tricky. Does anyone know how?
|||I had the same problem but was able to make it work using tips from this web site.
I have W2k3 Standard Server SP1, SS2K5 Standard SP1. Both SS (SQL Server) and SSA (SQL Server Agent) run with Local System account, automatic start up.
1. Configure Database Mail. Create the profile, specify your smtp server, follow other steps, test it. If the test was sucessful, you are half way there.
2. Create Operator(s)
3. Configure SSA to use the profile you created when configuring Database Mail. Right click SSA --> Properties --> Alert System, check Enable Mail Profile, verify you have Database Mail for Mail system selected, verify you have your profile selected in Mail profile drop-down box. The TEST button will be greyed out. It is for SQL Mail test (I think). At this point I had to restart SSA. Otherwise the last steps failed for me. Microsoft says we shouldn't have to restart the SSA but that was not the case in my situation.
4. Create your Maintenance Plan or SSA jobs. In the Maintenance Plan add Notify Operator Task, save the plan. Execute it. If you did not use the Maintenance Plan and instead simply created the job, then in the Notifications tab (Job --> Properties --> Notifications), check the box for e-mail, select an Operator, and when the notification should be sent.
I prefer to use Maintenance Plan for the notificatioin purpose as it is more flexible and gives more options.
|||I got it worked for me but here is the tricky part: it must be done in SQL SAC. I restarted SQL Agent using services.msc and SQL Management Studio: neither one worked. I kept googoling and tried to use SQL Surface Area Configuration; it worked.
So what is the difference here?
No comments:
Post a Comment