Yesterday, a developer from application team sent an email saying, he is not able to send mail alerts using database mail from a production server.
I asked which DB Profile name [@profile_name] you are using. As we have different profiles in different servers. [Which is not a best practice. We should use same profile name within our environment to keep uniformity]
He was using the correct profile. Then I requested him to share the error details.
Error Details were as below:
“No global profile is configured. Specify a profile name in the @profile_name parameter”
I realized the profile was not configured as default profile. So, I made the DB mail profile as default and it resolved the issue.
Below is the procedure to configure Global Profile in Database Mail.
- Connect to the target SQL Server with SSMS (SQL Server Management Studio)
- Expand the Managementsection
- Right-click on Database mailand select Configure Database Mail
4. From the Wizard, click on Next >
5. From the Task screen, select Manage Profile Security and click on Next>
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 from the drop-down then click on Next >
7. From the Complete the Wizard screen, click on Finish