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

Troubleshooting Guide: SQL Server Error 5595 – “.PhysicalPathName is disabled”

Why This Error Happens

This error typically occurs when a database file (.mdf, .ldf, or .ndf) references a physical path that SQL Server cannot access due to insufficient NTFS permissions for the SQL Server service account. It can also happen when the underlying volume or path has been marked offline, disconnected, or is residing on removable/disabled storage media. In some cases, this is triggered during database restore or attach operations where the original file path no longer exists or has been remapped incorrectly.

Step-by-Step Resolution Guide

Step 1: Verify the Physical File Path and Disk Status

  • Open Disk Management (diskmgmt.msc) on Windows Server 2025 / Windows 11 and confirm the volume hosting the database files is Online, not Offline or Disabled.
  • Check File Explorer to ensure the folder path referenced in SQL Server (e.g., D:\SQLData\YourDB.mdf) actually exists and is reachable.
  • Run sqlcmd -Q "SELECT name, physical_name, state_desc FROM sys.master_files;" to confirm the exact path SQL Server expects.

Step 2: Correct NTFS Permissions for the SQL Server Service Account

  • Right-click the folder containing the database files (e.g., D:\SQLData), select Properties > Security.
  • Add the SQL Server service account (commonly NT Service\MSSQLSERVER or a custom domain service account) with Full Control permissions.
  • Apply changes and restart the SQL Server service via services.msc or run:
  net stop MSSQLSERVER
  net start MSSQLSERVER

Step 3: Re-Enable or Reattach the Database File

  • If the file path was disabled due to a storage driver or BitLocker lock, re-enable the disk using:
  Mount-DiskImage -ImagePath "D:\path\to\disk.vhdx"
  • If the database is marked suspect or offline, bring it back online using SSMS or:
  ALTER DATABASE YourDB SET ONLINE;
  • If the physical file was moved, update the path using:
  ALTER DATABASE YourDB MODIFY FILE (NAME = YourDB_Data, FILENAME = 'D:\SQLData\YourDB.mdf');

Step 4: Check Group Policy and Storage Spaces Direct (S2D) Configuration

  • On Windows Server 2025, verify no Group Policy Object (GPO) is restricting access to removable or external storage, which can inadvertently disable physical paths.
  • If using Storage Spaces Direct or clustered storage, confirm the Cluster Shared Volume (CSV) is in a healthy state via Failover Cluster Manager.

Alternative or Verification Steps

  • Run sp_helpdb YourDB or query sys.databases to confirm the state_desc shows ONLINE and no file-related warnings appear in the SQL Server Error Log (ERRORLOG file).
  • If the issue persists, restore the database from a known-good backup to a healthy, accessible drive path and reconfigure permissions before bringing it online.