How to fix Error 11215 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 11215 – Service Broker Send Permission Denied

Why This Error Happens

Error 11215 occurs when a database user attempts to send a message to a Service Broker service but lacks the explicit SEND permission on that service object. This is common after a database restore, migration, or when a new login/user is mapped without re-establishing Service Broker-specific grants, since SEND permissions are not inherited through standard database role memberships like db_owner in all contexts. It can also surface when the service name referenced in the BEGIN DIALOG CONVERSATION statement has been altered, dropped, and recreated, causing stale permission mappings tied to the old object ID.

Step-by-Step Resolution Guide

Step 1: Identify the User and Service Involved

  • Note the User ID and Database ID from the error message text.
  • Run the following query against the affected database to resolve the IDs to names:
SELECT USER_NAME(<user_id>) AS UserName, DB_NAME(<database_id>) AS DatabaseName;
  • Cross-reference the service name provided in the error (the %.*ls placeholder) with sys.services to confirm it exists and is active.

Step 2: Grant SEND Permission on the Service

  • Connect to the target database using SQL Server Management Studio (SSMS) or sqlcmd on Windows Server 2025.
  • Execute the grant statement using the exact service name identified in Step 1:
GRANT SEND ON SERVICE::[YourServiceName] TO [YourUserName];
  • If the user sends messages via a stored procedure under a different execution context, ensure the permission is granted to the correct proxy user, not just the login.

Step 3: Verify the Service and Contract Configuration

  • Check sys.service_permissions to confirm the grant was successfully applied:
SELECT * FROM sys.service_permissions WHERE major_id = (SELECT service_id FROM sys.services WHERE name = 'YourServiceName');
  • Ensure the Service Broker is enabled on the database by checking the is_broker_enabled flag in sys.databases; if it is 0, enable it using ALTER DATABASE [YourDB] SET ENABLE_BROKER;.

Step 4: Restart the SQL Server Service Broker Task (If Necessary)

  • If permissions were granted but the error persists due to cached execution plans, restart the SQL Server Service via the Windows Services console (services.msc) on Windows Server 2025.
  • Alternatively, run ALTER DATABASE [YourDB] SET NEW_BROKER WITH ROLLBACK IMMEDIATE; only if conversation history is not critical, as this resets the Broker conversation handles.

Alternative or Verification Steps

  • To verify the fix, have the application resend the specific message; monitor the SQL Server Error Log via Event Viewer (Windows Logs > Application) to confirm Event ID 11215 no longer triggers.
  • If the error continues despite granted permissions, check for a DENY SEND statement that may be explicitly blocking the user, as DENY overrides GRANT in SQL Server’s permission hierarchy.