Share via


Database Mail Configuration Stored Procedures

Database Mail configuration stored procedures are located in the msdb database.

The following tables list the stored procedures used for configuring and managing Database Mail.

Configuration

Name Description

sysmail_configure_sp (Transact-SQL)

Changes configuration settings for Database Mail.

sysmail_help_configure_sp (Transact-SQL)

Displays configuration settings for Database Mail.

Accounts and Profiles

Name Description

sysmail_add_account_sp (Transact-SQL)

Creates a new Database Mail account.

sysmail_add_profile_sp (Transact-SQL)

Creates a new Database Mail profile.

sysmail_add_profileaccount_sp (Transact-SQL)

Adds a mail account to a Database Mail profile.

sysmail_delete_account_sp (Transact-SQL)

Deletes a Database Mail account.

sysmail_delete_profile_sp (Transact-SQL)

Deletes a Database Mail profile.

sysmail_delete_profileaccount_sp (Transact-SQL)

Removes an account from a Database Mail profile.

sysmail_help_account_sp (Transact-SQL)

Lists information about Database Mail accounts.

sysmail_help_profile_sp (Transact-SQL)

Lists information about one or more Database Mail profiles.

sysmail_help_profileaccount_sp (Transact-SQL)

Lists the accounts associated with one or more Database Mail profiles.

sysmail_update_account_sp (Transact-SQL)

Updates the information in an existing Database Mail account.

sysmail_update_profile_sp (Transact-SQL)

Changes the description or name of a Database Mail profile.

sysmail_update_profileaccount_sp (Transact-SQL)

Updates the sequence number of an account within a Database Mail profile.

Security

Name Description

sysmail_add_principalprofile_sp (Transact-SQL)

Grants permission for a database principal to use a Database Mail profile.

sysmail_delete_principalprofile_sp (Transact-SQL)

Removes permission for a database user to use a public or private Database Mail profile.

sysmail_help_principalprofile_sp (Transact-SQL)

Lists Database Mail profile information for a given database user.

sysmail_update_principalprofile_sp (Transact-SQL)

Updates the permission information for a given database user.

System State

Name Description

sysmail_start_sp (Transact-SQL)

Starts the Database Mail external program and the associated SQL Service Broker queue.

sysmail_stop_sp (Transact-SQL)

Stops the Database Mail external program and the associated SQL Service Broker queue.

sysmail_help_status_sp (Transact-SQL)

Indicates if Database Mail is started.

Maintenance and Troubleshooting

Name Description

sysmail_delete_log_sp (Transact-SQL)

Deletes events from the Database Mail log.

sysmail_delete_mailitems_sp (Transact-SQL)

Deletes e-mails from the Database Mail tables.

sysmail_help_queue_sp (Transact-SQL)

Indicates the status of the Database Mail queues.

See Also

Tasks

Troubleshooting Database Mail

Concepts

Database Mail Architecture

Help and Information

Getting SQL Server 2005 Assistance