title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sysmail_start_sp (Transact-SQL) |
Starts Database Mail by starting the Service Broker objects that the external program uses. |
MashaMSFT |
mathoma |
randolphwest |
08/21/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Starts Database Mail by starting the [!INCLUDE ssSB] objects that the external program uses.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sysmail_start_sp
[ ; ]
None.
0
(success) or 1
(failure).
None.
Database Mail isn't enabled or installed upon [!INCLUDE ssNoVersion] 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 [!INCLUDE ssSB] 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.
Note
This stored procedure only starts the queues for Database Mail. This stored procedure doesn't activate [!INCLUDE ssSB] message delivery in the database.
[!INCLUDE msdb-execute-permissions]
The following example shows starting Database Mail in the msdb
database. The example assumes that Database Mail has been enabled.
USE msdb;
GO
EXECUTE dbo.sysmail_start_sp;
GO