Troubleshooting Guide: SQL Server Error 5055 – “Cannot Add File”
Why This Error Happens
Error 5055 typically occurs when SQL Server 2025 cannot create or extend a database file because of insufficient NTFS permissions on the target directory, a filegroup that has reached its maximum configured size, or disk-level constraints such as low free space or a read-only volume. It can also surface when the path specified for the new file does not exist or is inaccessible to the SQL Server service account. In clustered or Availability Group configurations, this error may indicate that the path is not valid across all cluster nodes.
Step-by-Step Resolution Guide
Step 1: Verify Service Account Permissions
- Open Services.msc and identify the account running the SQL Server (MSSQLSERVER) service.
- Navigate to the target folder (e.g.,
D:\SQLData\) in File Explorer, right-click → Properties → Security tab. - Ensure the SQL Server service account has Full Control on the directory.
- If missing, click Edit → Add, enter the service account name, and grant Full Control, then click Apply.
Step 2: Check Disk Space and File Path Validity
- Open Disk Management (
diskmgmt.msc) or runGet-PSDrivein PowerShell to confirm the target drive has sufficient free space. - Confirm the exact path exists by running:
Test-Path "D:\SQLData\YourDB_Data.ndf"
- If the path does not exist, create the folder structure manually before retrying the
ALTER DATABASE ... ADD FILEcommand. - For clustered instances, verify the path exists identically on all nodes in Failover Cluster Manager.
Step 3: Review Filegroup and Autogrowth Settings
- In SQL Server Management Studio (SSMS), right-click the database → Properties → Files.
- Check if Autogrowth/Maxsize is capped and not allowing the file to expand.
- Run the following T-SQL to inspect current file configuration:
SELECT name, size, max_size, growth
FROM sys.database_files;
- Adjust
MAXSIZEtoUNLIMITEDor increase growth increments if needed:
ALTER DATABASE YourDB
MODIFY FILE (NAME = YourDB_Data, MAXSIZE = UNLIMITED);
Step 4: Restart SQL Server Service and Re-Attempt
- Restart the SQL Server (MSSQLSERVER) service via
services.mscor PowerShell:
Restart-Service -Name 'MSSQLSERVER' -Force
- Re-run the original
ALTER DATABASEorCREATE DATABASEcommand that triggered Error 5055.
Alternative or Verification Steps
- Confirm success by querying
sys.master_filesto validate the new file appears with the correct size and path. - If the issue persists, try adding the file to an alternate local drive with known-good permissions to isolate whether the problem is path-specific or a broader SQL Server configuration issue.