Sysmail_help_profile_sp – Day 13 – SQL Server System Stored Procedure

Hi friends, today in SQL Server system stored procedure series we will learn how to get information about database mail profile using stored procedure sysmail_help_profile_sp.

Sysmail_help_profile_sp stored procedure provides information about the database mail profiles. This stored procedure is stored in msdb database and owned by dbo schema. The procedure must be executed with a three part name if current database is not msdb.


sysmail_help_profile_sp  [   [ @profile_id = ] profile_id | [ @profile_name = ] 'profile_name' ]


@profile_id  is the id of database mail profile with default value NULL.

@profile_name is the name of the database mail profile.

When profile_id or profile_name is specified, sysmail_help_profile_sp stored procedure return information about that profile. If a profile_id or profile_name is not specified it returns information about all profiles in current SQL Server instance.

In our previous blog we created a database mail profile with name ‘Database Test Mail’ here. Now we will pass that profile name in the parameter to retrieve information about that profile.

EXEC msdb.dbo.sysmail_help_profile_sp@profile_name = 'Database Test Mail'


Here, in result set we get information of that database mail profile.

Profile_id – Profile id of database mail profile.

Name – Name of database mail profile.

Description – Description about database mail profile.

That’s all folks for the day. In next blog we will see how to update the information about database mail profile. Have a nice day 🙂


About Kapil Singh Kumawat

Kapil Singh Kumawat has been working with SQL Server since last 5 years. He is from Jaipur, Rajasthan, India and currently working with Cognizant Technology Solutions as SQL Server Developer. He has good experience in performance tuning, SSIS, data migration and data designing. Apart from database he has interest in travelling, watching football and listening music.

View all posts by Kapil Singh Kumawat →

Leave a Reply

Your email address will not be published.