Showing posts with label databasemail. Show all posts
Showing posts with label databasemail. Show all posts

Friday, February 24, 2012

DatabaseMail setup problems

I'm bust to setup a mail nothification system by using DatabaseMail.
The setup of the database mail was ok. I'm able to send a test mail.
After that I modified the SQLAgent's Alert system. I enabled the mail profile and as Mailsystem i choosed Database Mail with the mail profile the one I created in during the database mail setup.

No I like to use this when a job fails or an alert is fired. So I created an operator.
Give it the name SQLMAil and e-mailname
- first try a normal e-mail address vname.name@.provider.be
- second try the database mail profilename (SQLMAIL)

I created also an alert theat make use of this operator.

When the alert fires, it doesn't send a mail because of a failure.
We have always the following message in SQL Agent log:

Log SQL Agent (Current - 30/11/2005 09:35:00)

Message
[264] An attempt was made to send an email when no email session has been established
What did I do wrong. Can someone help me?

I am having the exact same problem. Exact.|||Are you seeing this on 64 bit platform. If so we have a tracking bug that will be addressed in the next public release.

If you see this on 32 bit platform then this is different. I can follow up to figure what could be the reason.

Thanks,
Gops Dwarak|||It is an HP 585 system with 2 dual core AMD opteron CPU's running with W2003 X64 version. SQL2005 for X64 bit system has been installed.

Greetings
Ludo Bernaerts|||You see this on 64 bit platform. We have tracking bug for this and is expected to be addressed in next service pack.

For now the workaround is to use Agent Mail.

Gops Dwarak|||When will this bug-fix be available?

Agentmail is possible but can we install a small Exchange client on X64 bit servers like we did on 32 bit servers with Exchange client 5.0.|||

There is a workaround to use DBMail for notifications, till the next Service pack that address this bug. On Alert, trigger a job and the job step calling sp_notify_operator should help.

Gops Dwarak

|||I'm having the exact same problem on 32bit system the sql instance is running on a Virtual Server with sql agent on a a svc account and smtphost configured with Outlook Express on same svc account session and test works and test mail from OE works with apllication warned unflagged.

DatabaseMail setup problems

I'm bust to setup a mail nothification system by using DatabaseMail.
The setup of the database mail was ok. I'm able to send a test mail.
After that I modified the SQLAgent's Alert system. I enabled the mail profile and as Mailsystem i choosed Database Mail with the mail profile the one I created in during the database mail setup.

No I like to use this when a job fails or an alert is fired. So I created an operator.
Give it the name SQLMAil and e-mailname
- first try a normal e-mail address vname.name@.provider.be
- second try the database mail profilename (SQLMAIL)

I created also an alert theat make use of this operator.

When the alert fires, it doesn't send a mail because of a failure.
We have always the following message in SQL Agent log:

Log SQL Agent (Current - 30/11/2005 09:35:00)

Message
[264] An attempt was made to send an email when no email session has been established
What did I do wrong. Can someone help me?

I am having the exact same problem. Exact.|||Are you seeing this on 64 bit platform. If so we have a tracking bug that will be addressed in the next public release.

If you see this on 32 bit platform then this is different. I can follow up to figure what could be the reason.

Thanks,
Gops Dwarak|||It is an HP 585 system with 2 dual core AMD opteron CPU's running with W2003 X64 version. SQL2005 for X64 bit system has been installed.

Greetings
Ludo Bernaerts|||You see this on 64 bit platform. We have tracking bug for this and is expected to be addressed in next service pack.

For now the workaround is to use Agent Mail.

Gops Dwarak|||When will this bug-fix be available?

Agentmail is possible but can we install a small Exchange client on X64 bit servers like we did on 32 bit servers with Exchange client 5.0.|||

There is a workaround to use DBMail for notifications, till the next Service pack that address this bug. On Alert, trigger a job and the job step calling sp_notify_operator should help.

Gops Dwarak

|||I'm having the exact same problem on 32bit system the sql instance is running on a Virtual Server with sql agent on a a svc account and smtphost configured with Outlook Express on same svc account session and test works and test mail from OE works with apllication warned unflagged.

databasemail setup for SQL 2005 Express

I have installed SQL 2005 Express with all options and turned on the database mail SP's in the surface area configuration, When I try to use database mail the entry in allitems is created but it is never sent. I followed the troubleshooting guides and find that databasemail90.exe was never installed in the binn folder. How can I get this file and whatever else might be missing to make this functionality work?Database Mail is not supported on SQL 2005 Express Edition.

DatabaseMail process shuts down by itself

I have a job set up to run sp_send_dbmail. Then I notice there were no emails sent out. I check the log I found "DatabaseMail Process is shutting down".
In the log, there was "DatabaseMail Process Started" also.
I don't know what is calling this processes.
If in the log, Stop was the last activity, all I can make this process start is to restart the database.

Does anyone know the trick?

Experiencing the same problem as you, I managed to start the process which was automatically shut down by sending a new test mail. After the process was started I tried running the job which shoul trigger the mail again. No luck this time either, but in the log I now found that no default mail profile was set.

I couldn't find a good was to set a default profile in the Management Studio IDE other than removing the old account and profile and then create it all over again, this time setting the new profile as the default profile. After that It worked.

Hope it works out.

|||

If you right click on Database Mail you can select the mail log. Are there any errors in there? Check the SQL Agent error log and the SQL Server Log.

You need to set up an initial DBMail profile (for the Server) and the email server it is pointing to. Also try to run the Database Mail Configuration Wizard again or open up Management, and right-click Database Mail, then follow the prompts.

Also try to restart SQLAgent in this case.

|||

Database Mail process shuts itself down after a certain period of inactivity. The default value is 10 minutes, which can be changed via Database Mail Configuration Wizard (can be found in Management Studio Object Explorer under Management | Database Mail) in "Configure System Parameters" dialog.

There are some other steps you can take to troubleshoot the issue, such as making sure your profile is set correctly. Here is a good starting point:

http://msdn2.microsoft.com/en-us/library/ms175887.aspx

Sunday, February 19, 2012

DatabaseMail process shuts down by itself

I have a job set up to run sp_send_dbmail. Then I notice there were no emails sent out. I check the log I found "DatabaseMail Process is shutting down".
In the log, there was "DatabaseMail Process Started" also.
I don't know what is calling this processes.
If in the log, Stop was the last activity, all I can make this process start is to restart the database.

Does anyone know the trick?

Experiencing the same problem as you, I managed to start the process which was automatically shut down by sending a new test mail. After the process was started I tried running the job which shoul trigger the mail again. No luck this time either, but in the log I now found that no default mail profile was set.

I couldn't find a good was to set a default profile in the Management Studio IDE other than removing the old account and profile and then create it all over again, this time setting the new profile as the default profile. After that It worked.

Hope it works out.

|||

If you right click on Database Mail you can select the mail log. Are there any errors in there? Check the SQL Agent error log and the SQL Server Log.

You need to set up an initial DBMail profile (for the Server) and the email server it is pointing to. Also try to run the Database Mail Configuration Wizard again or open up Management, and right-click Database Mail, then follow the prompts.

Also try to restart SQLAgent in this case.

|||

Database Mail process shuts itself down after a certain period of inactivity. The default value is 10 minutes, which can be changed via Database Mail Configuration Wizard (can be found in Management Studio Object Explorer under Management | Database Mail) in "Configure System Parameters" dialog.

There are some other steps you can take to troubleshoot the issue, such as making sure your profile is set correctly. Here is a good starting point:

http://msdn2.microsoft.com/en-us/library/ms175887.aspx

DatabaseMail process shuts down by itself

I have a job set up to run sp_send_dbmail. Then I notice there were no emails sent out. I check the log I found "DatabaseMail Process is shutting down".
In the log, there was "DatabaseMail Process Started" also.
I don't know what is calling this processes.
If in the log, Stop was the last activity, all I can make this process start is to restart the database.

Does anyone know the trick?

Experiencing the same problem as you, I managed to start the process which was automatically shut down by sending a new test mail. After the process was started I tried running the job which shoul trigger the mail again. No luck this time either, but in the log I now found that no default mail profile was set.

I couldn't find a good was to set a default profile in the Management Studio IDE other than removing the old account and profile and then create it all over again, this time setting the new profile as the default profile. After that It worked.

Hope it works out.

|||

If you right click on Database Mail you can select the mail log. Are there any errors in there? Check the SQL Agent error log and the SQL Server Log.

You need to set up an initial DBMail profile (for the Server) and the email server it is pointing to. Also try to run the Database Mail Configuration Wizard again or open up Management, and right-click Database Mail, then follow the prompts.

Also try to restart SQLAgent in this case.

|||

Database Mail process shuts itself down after a certain period of inactivity. The default value is 10 minutes, which can be changed via Database Mail Configuration Wizard (can be found in Management Studio Object Explorer under Management | Database Mail) in "Configure System Parameters" dialog.

There are some other steps you can take to troubleshoot the issue, such as making sure your profile is set correctly. Here is a good starting point:

http://msdn2.microsoft.com/en-us/library/ms175887.aspx

Databasemail

Hi,

i have set up databasemail to send me e-mail after my sql backup has finished.

Profile and account has bin configured,and test mail ha been sent. Works just fine.

But when my backup has finished, no e-mail is being sent.

Get this error message in error logs: [264] An attemtemt was made to send an e-mail when no email session was established.

My system is

Microsoft Windows Server 2003 R2. SP2. Standard Edition.

SQL sever 2005, sp2

Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML 2.6 3.0 6.0
Microsoft Internet Explorer 6.0.3790.3959
Microsoft .NET Framework 2.0.50727.832
Operating System 5.2.3790

DId you have a look on:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=354995&SiteID=1

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||You can use the below code as step two in your backup job to invoke mail alert.
Dont forget to change profilename,recipients, subject & body in the below code before inserting into job

Code Snippet

Exec msdb..sp_send_dbmail @.profile_name='<profilename>',
@.recipients='Your Email Address',
@.subject='Your Subject here',
@.body='Your Body Message',
@.query='SET NOCOUNT ON
select ''SERVER NAME : '' + @.@.servername
select SUBSTRING(s.name,1,40) AS ''Database Name'',
CAST(b.backup_start_date AS char(25)) AS ''Last Backup Date'',
CASE WHEN b.backup_start_date > DATEADD(dd,-1,getdate())
THEN ''Backup Completed ''
WHEN b.backup_start_date > DATEADD(dd,-7,getdate())
THEN ''Backup Older than One day ''
ELSE ''Backup Older than One Week ''
END
AS ''Status'',
substring(m.physical_device_name ,1,100) AS ''Backup File Name''

from master..sysdatabases s
LEFT OUTER JOIN msdb..backupset b
ON s.name = b.database_name
AND b.backup_start_date = (SELECT MAX(backup_start_date)
FROM msdb..backupset
WHERE database_name = b.database_name
AND type = ''D'' ) -- full database backups only, not log backups
left outer join msdb..backupmediafamily m
on m.media_set_id=b.media_set_id
and m.physical_device_name=(select max(physical_device_name) from msdb..backupmediafamily
where media_set_id=b.media_set_id)
WHERE s.name <> ''tempdb''
ORDER BY s.name'