sysmail_update_profile_sp (Transact-SQL)
Changes the description or name of a Database Mail profile.
When both the profile id and the profile name are specified, the procedure changes the name of the profile to the provided name and updates the description for the profile. When only one of these arguments is provided, the procedure updates the description for the profile.
The stored procedure sysmail_update_profile_sp is in the msdb database and is owned by the dbo schema. The procedure must be executed with a three-part name if the current database is not msdb.
A. Changing the description of a profile
The following example changes the description for the profile named AdventureWorks Administrator in the msdb database.
EXECUTE msdb.dbo.sysmail_update_profile_sp
@profile_name = 'AdventureWorks Administrator'
,@description = 'Administrative mail profile.';
B. Changing the name and description of a profile
The following example changes the name and description of the profile with the profile id 750.
EXECUTE msdb.dbo.sysmail_update_profile_sp
@profile_id = 750
,@profile_name = 'Operator'
,@description = 'Profile to send alert e-mail to operators.';
