If you’ve already created an association between a principal and a Database Mail profile, but you now want to change whether the profile is the default profile for that user, you can do that with the sysmail_update_principalprofile_sp
stored procedure.
When doing this, you need to provide the name or ID of both the user and the profile. This is because you need to specify exactly which profile/principal association you want to update.
Continue reading