No global profile is configured. Specify a profile name in the @profile_name parameter

Disclaimer:Hey Guys, this post contains affiliate link to help our reader to buy best product\service for them. It helps us because we receive compensation for our time and expenses. 

Note:  Best viewed in Internet Explorer 6 and above

Error: No global profile is configured. Specify a profile name in the @profile_name parameter

Infrastructure: SQL server 2005 and onward

Scenario: Here the scenario was, client was trying to run some stored procedure. In that stored procedure she was calling send_db_mail to send some query result output as attachment like some excel file but sp was breaking during DB mail shoot.

Resolution:

As per the error it tells us that there is no global profile defined and so we should specify a value for @profile_name but overall error was actually misleading. It was something to do with DB mail profile security.

Follow the below steps to check database public profile security:

  1. Go to DB mail configuration wizard
  2. Manage profile security
  3.  Set public profile security to Yes and increase the MaxFileSize to its max value to allow sending big attachment (this can be set to max 2GB when your query output seems to be big in size)

To change database attachment size, refer below link.

https://www.mssqltips.com/sqlservertip/4599/sql-server-database-mail-attachment-error/

Hope this helps!!

Dear Visitors!
To get Best Deals and Discounts Buy Now from Amazon just by
Clicking This Image

Simply send snap of your product details after delivery at ad22092012@gmail.com for more surprises or additional discounts