sysmail_start_sp (Transact-SQL)


THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Starts Database Mail by starting the Service Broker objects that the external program uses.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions



0 (success) or 1 (failure)


Database Mail is not enabled or installed uponSQL Server installation. Use the Database Mail Configuration wizard to enable and install the Database Mail objects.

This stored procedure is in the msdb database. This stored procedure starts the Database Mail queue that holds outgoing message requests and enables the Service Broker activation for the external program.

When the queues are started, the Database Mail external program can process messages. This procedure allows you to restart the queues after the queues have been stopped with the sysmail_stop_sp stored procedure.

System_CAPS_ICON_note.jpg Note

This stored procedure only starts the queues for Database Mail. This stored procedure does not activate Service Broker message delivery in the database.

Execute permissions for this procedure default to members of the sysadmin fixed server role.

The following example shows starting Database Mail in the msdb database. The example assumes that Database Mail has been enabled.

USE msdb ;  
EXECUTE dbo.sysmail_start_sp ;  

Database Mail
Database Mail XPs Server Configuration Option
sysmail_stop_sp (Transact-SQL)
Database Mail Stored Procedures (Transact-SQL)

Community Additions