Hi friends, in this blog of SQL Server system stored procedure we will continue with another database mail stored procedure sysmail_help_principalprofile_sp.

Sysmail_help_principalprofile_sp stored procedure list the information about associations between database mail profile and database principals.

When sysmail_help_principalprofile_sp stored procedure is executed without any parameters then it returned lists all of the associations in the instance of SQL Server.



@principal_Id – ID of the database user or role in msdb database.

@principal_name – Name of the database user or role in msdb database. Either @principal_id or @principal_name is necessary to specify.

@profile_id – Id of the database mail profile.

@profile_name – Name of the database mail profile. Either @profile_id or @profile_name must be specified.

Now let’s execute the below stored procedure by passing database profile name in parameters:


Similarly when we executed this stored procedure without passing any parameters it will return list of all association in instance of SQL Server.

That’s all friends for the day :)



Kapil Singh

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