SQL Server error 3201: Cannot open backup device
SQL Server couldn't open the backup file or path. The operating system error in the message (2, 3, 5...) tells you if it's missing or access denied.
- Error number
3201- Severity
- 16
- Category
- Backup and restore
What it means
Backups and restores are performed by the SQL Server service, not by your client. Error 3201 means the service couldn't open the file, and the message includes the operating system error: 2 (file not found), 3 (path not found) or 5 (access denied) are the common ones.
Common causes
- Operating system error 5: the SQL Server service account has no permission on the folder or share.
- Operating system error 2 or 3: the path or file doesn't exist on the server. A path on your own machine, or a mapped drive letter, isn't visible to the service.
- A network share used through a mapped drive instead of a UNC path (
\\server\share\...). - On Linux, a path the
mssqluser can't access.
How to fix it
-
Find which account SQL Server runs as, then grant it access to the folder.
SELECT servicename, service_account FROM sys.dm_server_services;
-
Use a path on the server itself or a UNC path, not a mapped drive.
BACKUP DATABASE SalesDb TO DISK = N'\\fileserver\sqlbackups\SalesDb.bak' WITH COMPRESSION;
-
Check that the folder exists from SQL Server's point of view.
EXEC master.sys.xp_dirtree N'D:\Backup', 1, 1;
Related errors
More backup and restore errors
The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.
Work on SQL Server in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.