ProjectSMM.com
Gonzo TechNet
How to Configure the Global Profile in Database Mail
Jump to: Configure Using the Wizard Configure using the [sysmail_update_principalprofile_sp] stored procedure

After installing and configuring Database Mail on SQL 2005 or SQL 2008, when you try to send an email using msdb.dbo.sp_send_dbmail you get an error message as follows:

Msg 14636, Level 16, State 1, Procedure sp_send_dbmail, Line 107 No global profile is configured. Specify a profile name in the @profile_name parameter

This is caused because none of the database mail profiles you created were set to be the "Global Profile". Use one of the following methods to configure a default or "Global" email profile

Method 1: Configure a Default or Global Database Mail profile with the Wizard
  1. Connect to the target SQL Server with SSMS (SQL Server Management Studio)
  2. Expand the Management section
  3. Right-click on Database mail and select Configure Database Mail Configure Database Mail
  4. From the Wizard, click on Configure Database Mail
  5. From the Task screen, select Manage Profile Security and click on Database Mail Manage Profile Security
  6. From the Manage Profile Security screen, select the target profile, then click in the Default Profile tab to activate the drop-down.
    Select Yes fromt the drop-down then click on Database Mail set default profile
  7. From the Complete the Wizard screen, click on Database Mail set default profile finish
Method 2: Configure a Default or Global Database Mail profile with [sysmail_update_principalprofile_sp]
  1. To display or verify the status Database Mail profiles, execute the following stored procedure from within SSMS:
    exec msdb.dbo.sysmail_help_principalprofile_sp
    As you can see, the is_default for all the profiles is set to 0. This means that NONE of the profiles is set as the default or global profile. Database Mail check profile status
  2. To configure a profile as the default/global one, execute the following stored procdure, specifying the appropriate parameters: Database Mail update profile status
  3. You can now verify that the profile has been configured as the Global or Default Database Mail Profile Database Mail verify profile status
Home | TechNet | ADO.Net | DOS | ASP.NET | IIS | VB.NET | VIM (vi) | Windows | XHtml
MS-SQL | T-SQL | SSIS | Oracle