HOW-TO: Check SQL Server Database Mail & Start Service

Because the database mail service is disabled after 10 minutes by default in SQL Server 2005, you may want to run this script to check if the service is enabled, and if not, start it.
IF NOT EXISTS 
(
 SELECT 1 FROM msdb.sys.service_queues
 WHERE name = N'ExternalMailQueue' AND is_receive_enabled = 1
)
-- Enable the database mail service
EXEC msdb.dbo.sysmail_start_sp


Add comment


 

  Country flag

biuquote
  • Comment
  • Preview
Loading



pureVirtual Services, LLC © 2009

Latest Alasdair Pics


What I've Been Reading


delicious feed  [http://delicious.com/purevirtual]