-
Written By Robert Scott
-
Updated on November 3rd, 2025
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.
Here, we will cover all the most common reasons & the best ways to fix Operating System Error 3.
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:
Error message you’ll see:
|
Cannot open backup device ‘E:\SQLBackups\MyDB.bak’. Operating system error 3 (The system cannot find the path specified). |
Open Windows File Explorer and manually navigate to the path. If you can’t find it, SQL Server won’t either.
If the folder doesn’t exist, create it:
|
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.
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?
Open SQL Server Configuration Manager:
Common accounts:
Right-click the backup folder → Properties → Security tab → Edit
Click Add and enter your SQL Server service account:
After that, grant these permissions:
Click Apply → OK
|
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.
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.
Ans: Fix it by verifying the file path exists and granting the SQL Server service account full read/write permissions to that folder.
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