Hi friends, today in SQL Server System stored procedure series we will continue with database mail stored procedure sysmail_add_profile_sp.

Sysmail_add_profile_Sp stored procedure is used to create database mail profile. A database mail profile can hold multiple database mail accounts. Database mail profile name must be unique for Microsoft SQL Server Database Engine. This stored procedure is stored in msdb database and owned by schema dbo.



@profile_name is the name of new database mail profile.

@description is the description for new profile having datatype nvarchar (256).

@profile_id is the ID of new profile having datatype int.

Let’s, execute the following code to create the new database mail profile:

So, a new database mail profile is created and we can check information related to this in stored procedure sysmail_help_profile_sp.

EXEC msdb.dbo.sysmail_help_profile_sp


That’s all for the day friends. We will continue with another database mail stored procedure in next post. Have a nice day :)


Kapil Singh

Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook 

Follow me on Twitter