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

Troubleshooting Guide: SQL Server Error 7152 – “READEXT” Failure

Why This Error Happens

Error 7152 typically occurs when SQL Server 2025’s Extensibility Framework (READEXT) fails to locate, load, or communicate with an external extension library, such as those used for Python, R, or Java integration. This is commonly caused by missing or corrupted extension binaries in the BINN\mssql-extensibility directory, insufficient filesystem permissions for the SQL Server service account, or a mismatch between the extension’s architecture (x64) and the host environment. Additionally, on Windows Server 2025, this can be triggered by the Extensibility launcher process being blocked by Windows Defender Application Control (WDAC) or antivirus real-time scanning.

Step-by-Step Resolution Guide

Step 1: Verify the Extensibility Service and File Integrity

  • Open Services.msc and confirm that SQL Server Launchpad (or the Extensibility Host service in SQL 2025) is running under the correct service account.
  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\mssql-extensibility and ensure the folder is not empty or corrupted.
  • If files appear missing, re-run the SQL Server Setup wizard and select Repair to restore the extensibility components.

Step 2: Reset NTFS Permissions for the Service Account

  • Right-click the mssql-extensibility folder and select Properties > Security.
  • Ensure the SQL Server service account (e.g., NT Service\MSSQLSERVER) has Read & Execute and Modify permissions.
  • Use an elevated PowerShell terminal to reset inheritance if permissions appear broken:
  • icacls "C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Binn\mssql-extensibility" /reset /T

Step 3: Check Windows Defender and Firewall Exclusions

  • Since Windows Server 2025 has stricter default security policies, the “Extensibility” launcher (ExtLaunchPad.exe) may be quarantined.
  • Open Windows Security > Virus & threat protection > Manage settings > Add or remove exclusions.
  • Add the full path to the Binn folder as an exclusion to prevent the executable from being locked during initialization.

Step 4: Restart the SQL Server Instance

  • Open SQL Server Configuration Manager.
  • Right-click the SQL Server (MSSQLSERVER) instance and select Restart to reload the extensibility hosts and clear any hung READEXT handles.
  • Monitor the SQL Server Error Log immediately after restart for any secondary initialization errors.

Alternative or Verification Steps

  • Verify the Fix: Run a test query using sp_execute_external_script with a simple “Hello World” Python or R script to confirm the READEXT framework can successfully read and execute external code without throwing Error 7152.
  • Alternative Fix: If the error persists, check the TEMP environment variable for the service account; sometimes READEXT fails if it cannot create temporary session files due to a full or inaccessible temp directory on the Windows Server 2025 host.