Skip to content

Latest commit

 

History

History
50 lines (42 loc) · 4.73 KB

File metadata and controls

50 lines (42 loc) · 4.73 KB
description Database Mail Messaging Objects
title Database Mail Messaging Objects | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.service sql
ms.reviewer
ms.subservice
ms.topic conceptual
helpviewer_keywords
Database Mail [SQL Server], host databases
Database Mail [SQL Server], messaging objects
mail host databases [SQL Server]
host databases [Database Mail]
ms.assetid 5aa2886e-1db1-4066-85df-57ccf4538c54
author WilliamDAssafMSFT
ms.author wiassaf

Database Mail Messaging Objects

[!INCLUDE SQL Server SQL MI] The msdb database is the Database Mail host database. This database contains the stored procedures and messaging objects for Database Mail. Microsoft [!INCLUDEssManStudioFull] includes the Database Mail Configuration Wizard for enabling Database Mail, creating and managing profiles and accounts, and configuring Database Mail options.

Objects in msdb database

[!INCLUDEssSB] must be enabled in the msdb database. However, Database Mail does not use [!INCLUDEssSB] networking. Therefore, users do not have to create a [!INCLUDEssSB] endpoint to use Database Mail. The external Database Mail process uses a standard [!INCLUDEvstecado] connection to communicate with [!INCLUDEssNoVersion].

Database Mail exposes the following objects in the msdb database when Database Mail is enabled.

These objects are the interface for Database Mail within the mail host database. Other objects are installed to implement the functionality provided by the objects listed above. However, those objects are reserved for internal use.

Name Type Description
sysmail_allitems (Transact-SQL) View Lists all messages submitted to Database Mail.
sysmail_event_log (Transact-SQL) View Lists messages about the behavior of the Database Mail External Program.
sysmail_faileditems (Transact-SQL) View Information about messages that Database Mail could not sent.
sysmail_mailattachments (Transact-SQL) View Information about attachments to Database Mail messages.
sysmail_sentitems (Transact-SQL) View Information about messages that have been sent using Database Mail.
sysmail_unsentitems (Transact-SQL) View Information about messages that Database Mail in currently trying to send.
sp_send_dbmail (Transact-SQL) Stored Procedure Sends e-mail messages using Database Mail.
sysmail_delete_log_sp (Transact-SQL) Stored Procedure Deletes messages from the Database Mail log.
sysmail_delete_mailitems_sp (Transact-SQL) Stored Procedure Deletes mail items from the Database Mail queue.
sysmail_help_status_sp (Transact-SQL) Stored Procedure Indicates if Database Mail is started.
sysmail_start_sp (Transact-SQL) Stored Procedure Starts the Service Broker objects that the external program uses. These objects are started by default.
sysmail_stop_sp (Transact-SQL) Stored Procedure Stops the Service Broker objects that the external program uses.

See Also

Database Mail
SQL Server Service Broker