How to Fix Operating System Error 3 in SQL Server? Best Way

I’m trying to perform a bulk insert into an SQL table using a data file stored on my local system. Moreover, the SQL Server is hosted remotely.

However, I get the error:

Operating system error code 3 (The system cannot find the path specified.)

When I move the same file to the remote server, the query runs successfully.

Is there any workaround to bulk insert data from a local or network system? With or without manually copying the file to the SQL Server host?

Moira John Ronald, IT Lead

This is one of the frustrating cases when a user needs to fix Operating System Error 3. Let’s be honest, you’ve got backups to run, databases to protect, and deadlines to meet. Moreover, this error just threw a wrench in your entire workflow. Whether you’re dealing with incorrect file paths, permission issues, or network drive problems, this error has a habit of appearing at the worst possible time. But it’s one of the most common SQL Server errors, which means it’s also one of the easiest to fix. 

Thus, in this blog, we will cover all the causes & methods to solve this operating system error. 

Plausible Causes & Solutions of Error 3 in SQL Operating System

Here, we will cover all the most common reasons & the best ways to fix Operating System Error 3.

1. Incorrect or Non-Existent File Path

The Problem

This is the most common reason behind Error 3. You’ve specified a backup path that simply doesn’t exist on your server. It could be a typo, a deleted folder, or referencing a path from a different environment.

Common scenarios:

  • Typing D:\Backups\ when the folder is actually D:\Backup\
  • Copy-pasting scripts from another server with different drive configurations
  • The backup directory was deleted without updating your maintenance scripts

Error message you’ll see:

Cannot open backup device ‘E:\SQLBackups\MyDB.bak’. 

Operating system error 3 (The system cannot find the path specified).


The Solution to SQL Server Operating System Error 3

Step 1: Verify the path exists

Open Windows File Explorer and manually navigate to the path. If you can’t find it, SQL Server won’t either.

Step 2: Create the missing directory

If the folder doesn’t exist, create it:

  • By PowerShell: New-Item -Path “D:\SQLBackups” -ItemType Directory
  • Or simply create it through File Explorer: Right-click → New → Folder

Step 3: Use the correct path in your backup command


sql

Verify the path first

EXEC xp_fileexist ‘D:\SQLBackups\’;

 

— If it returns 1, the path exists. Now run your backup:

BACKUP DATABASE MyDatabase 

TO DISK = ‘D:\SQLBackups\MyDatabase.bak’

WITH INIT, COMPRESSION;

Pro Tip: Always use absolute paths (full path starting from the drive letter) instead of relative paths to avoid ambiguity.

2. Insufficient Permissions on the Backup Folder

The Problem

Here’s a crucial concept many DBAs miss: Just because YOU can access a folder doesn’t mean SQL Server can.

SQL Server runs under a service account (often NT Service\MSSQLSERVER or a custom domain account). If this account doesn’t have read/write permissions on your backup folder, you’ll hit Error 3.

Why does this happen?

  • Default security settings restrict access to certain folders
  • You created a new backup folder without granting SQL Server permissions
  • Network shares don’t include the SQL Server service account

The Solution to Fix Operating System Error 3 in MS SQL

Step 1: Identify your SQL Server service account

Open SQL Server Configuration Manager:

  1. Expand SQL Server Services
  2. Right-click your SQL Server instance → Properties
  3. Note the account under the Log On As tab

Common accounts:

  • NT Service\MSSQLSERVER (default instance)
  • NT Service\MSSQL$INSTANCENAME (named instance)
  • Custom domain account (e.g., DOMAIN\sql_service)
Step 2: Grant permissions to the backup folder

Right-click the backup folder → Properties → Security tab → Edit

Click Add and enter your SQL Server service account:

  • For default instance: NT Service\MSSQLSERVER
  • For named instance: NT Service\MSSQL$INSTANCENAME

After that, grant these permissions:

  • Read
  • Write
  • Modify

Click Apply → OK

Step 3: Test the backup

BACKUP DATABASE TestDB 

TO DISK = ‘D:\SQLBackups\TestDB.bak’

WITH FORMAT;

For Network Shares (UNC Paths):

If backing up to \\FileServer\Backups\, your SQL Server service account needs permissions on that network share too.

sql

— Grant share permissions (run on file server)

# Using PowerShell on the file server

Grant-SmbShareAccess -Name “Backups” -AccountName “DOMAIN\sql_service” -AccessRight Full

Quick Permission Test:

Run this to verify SQL Server can write to a location:

sql

EXEC xp_cmdshell ‘echo test > D:\SQLBackups\test.txt’;

— If this succeeds, permissions are correct

— Clean up: EXEC xp_cmdshell ‘del D:\SQLBackups\test.txt’;

These are the two most common causes & solutions to resolve Operating System Error 3. However, it is advised and followed by many SQL users to always keep a backup of SQL files with SQL Backup Repair.

Download Now Purchase Now

Concluding Thoughts

In short, Operating System Error 3 almost always boils down to two things: a path that doesn’t exist for the SQL Server service, or a folder it doesn’t have permission to access. The simplest and most reliable solution is to fix Operating System Error 3, always store and access your files directly on the SQL Server host. The key to resolving this error is to verify the file path and grant SQL Server permissions. By addressing these two areas, you can eliminate the issue and maintain smooth data operations.

Frequently Asked Questions

Q: How do I fix Operating System Error 3 in SQL Server?

Ans: Fix it by verifying the file path exists and granting the SQL Server service account full read/write permissions to that folder.

Q: How to avoid SQL Server Operating System Error 3 in the future?

Ans: To prevent it, always store files on the SQL Server machine itself and use a dedicated backup folder with permissions pre-configured for the SQL Server service account.

About The Author:

With more than five years of experience in email migration, Data Recovery, Email Backup, and File Management, I combine my years of experience with a strong interest in new technology. My professional journey is fueled by a genuine passion for navigating and mastering the latest advancements in these fields, ensuring that I stay ahead of the curve and bring innovative solutions to the table.

Related Post