Posted in Development, Stored Procedure

Sysmail_help_profile_sp – SQL Server Database Mail Stored Procedure – Part 4

Hi friends, today 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’. 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 🙂



I am Kapil Singh Kumawat working on SQL Server since last 5 years. I am from Jaipur, Rajasthan, India and currently working in Cognizant Technology Solutions as SQL Server Developer. I have a good experience in writing queries, performance tuning, SSIS, SSAS, Power BI, Data migration and database designing. Apart from database I have interest in travelling,watching football and listening music. My blogs are also published on

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s