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

Troubleshooting Guide: SQL Server Error 3047 – Invalid BackupDirectory Registry Key

Why This Error Happens

This error occurs when the BackupDirectory registry value under the SQL Server instance’s Microsoft SQL Server registry hive is missing, pointing to a path that no longer exists, or contains invalid characters. It can also happen after a manual drive remapping, a failed migration, or an uninstalled/relocated backup share where the original path was removed without updating the registry. Since SQL Server relies on this key to resolve relative backup paths and locate RESTORE checkpoint files, any mismatch between the registry entry and the actual filesystem causes the engine to throw Error 3047.

Step-by-Step Resolution Guide

Step 1: Verify the Current Registry Value

  • Open regedit on the Windows Server 2025 / Windows 11 host running the SQL Server 2025 instance.
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.<InstanceName>\MSSQLServer.
  • Locate the BackupDirectory string value and confirm whether the path listed actually exists on disk (e.g., D:\SQLBackups).

Step 2: Correct or Recreate the Backup Path

  • If the folder is missing, create it manually: mkdir D:\SQLBackups.
  • Ensure the SQL Server service account (e.g., NT Service\MSSQLSERVER or a custom domain service account) has Full Control NTFS permissions on this folder via right-click → Properties → Security tab.
  • Update the BackupDirectory registry key value to match the correct, existing path (no trailing backslash, e.g., D:\SQLBackups not D:\SQLBackups\).

Step 3: Apply Changes via SQL Server Instead of Direct Registry Edit (Recommended)

  • Open SQL Server Management Studio (SSMS) and connect to the instance.
  • Run the following T-SQL command to safely update the key through the supported interface:
  EXEC xp_instance_regwrite 
      N'HKEY_LOCAL_MACHINE', 
      N'Software\Microsoft\MSSQLServer\MSSQLServer', 
      N'BackupDirectory', 
      REG_SZ, 
      N'D:\SQLBackups';
  • This avoids manual registry corruption and ensures the value is written in the correct format expected by the Database Engine.

Step 4: Restart the SQL Server Service

  • Open SQL Server Configuration Manager.
  • Right-click the affected instance (e.g., SQL Server (MSSQLSERVER)) and select Restart.
  • Confirm the service starts without errors in the SQL Server Error Log (Management > SQL Server Logs in SSMS).

Alternative or Verification Steps

  • Run RESTORE FILELISTONLY FROM DISK = 'D:\SQLBackups\YourFile.bak' or perform a test BACKUP DATABASE using a relative filename only (no full path) to confirm SQL Server correctly resolves the BackupDirectory path without throwing Error 3047.
  • If the issue persists, check for a corrupted registry hive by comparing the key against a working instance or restoring the MSSQLServer registry subtree from a recent System State backup.