- Error number
- 3201
- Severity
- 16 (user-correctable error)
- State
- 1 or 3 when creating a backup file, 2 when opening an existing one
- Product
- Microsoft SQL Server Database Engine
- Versions
- All supported SQL Server versions (2016 to 2025), Azure SQL Managed Instance
- Category
- Backup & Restore
- Last reviewed
- 23 October 2026
On this page
What it means
Error 3201 means SQL Server could not create or open the backup file you named, and the operating system error in the message says why: wrong path, no permission, or a damaged device.
A BACKUP or RESTORE opens the backup file itself, as the SQL Server service account, on the server. When Windows refuses, SQL Server reports 3201 with the operating system error, and the statement stops with Msg 3013 ... is terminating abnormally. The OS error number is the key: 2 and 3 mean the file or folder does not exist, 5 means access is denied, and errors such as 21, 23, 27 and 1117 point to a device or hardware problem.
Two details trip people up. The path is resolved on the database server, not on your workstation, so C:\Backups means the server C: drive. And mapped drive letters belong to a user logon session, so a drive such as Z: that you see in Explorer is usually invisible to the service; use a UNC path such as \\fileserver\share instead. The state tells you the operation: states 1 and 3 when creating a backup file, state 2 when opening an existing one.
Common causes
- The folder in the path does not exist on the server, or the path has a typo (OS error 3), or the backup file to restore is not there (OS error 2).
- The SQL Server service account has no write permission on the folder or share (OS error 5). This often appears after moving backups to a network share or changing the service account.
- A mapped network drive letter was used: it exists in your Windows session but not for the SQL Server service.
- The file is locked by another process, such as a copy job or antivirus scan still holding it (OS error 32).
- The disk, share or device is failing or full (OS errors 21, 23, 27, 112 or 1117).
Diagnose it
Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.
Which account does SQL Server run as?
SELECT servicename, service_account, status_desc
FROM sys.dm_server_services; The account shown for the SQL Server service (for example NT Service\MSSQLSERVER or a domain account) is the one that needs read and write permission on the backup folder or share.
Where do backups normally go?
SELECT SERVERPROPERTY('InstanceDefaultBackupPath') AS default_backup_path;
SELECT TOP (10) bs.database_name, bs.backup_finish_date, mf.physical_device_name
FROM msdb.dbo.backupset AS bs
JOIN msdb.dbo.backupmediafamily AS mf ON mf.media_set_id = bs.media_set_id
ORDER BY bs.backup_finish_date DESC; The default backup folder and the paths recent successful backups used. Compare them with the path in the failing statement.
Read the full message from the error log
EXEC sp_readerrorlog 0, 1, N'Cannot open backup device'; Each failure with its path and OS error, including failures from SQL Server Agent jobs whose output you may not have seen.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Use a path that exists on the server
Client or network sideFor OS errors 2 and 3, check the path on the server itself (for example in Explorer or PowerShell on the server): the folder must exist, and for a restore the file must be there. Fix typos and create the folder if needed. For a network location, use the UNC path rather than a mapped drive letter.
Give the service account access to the folder or share
Changes permissionsFor OS error 5, grant the SQL Server service account (from the first diagnostic) Modify permission on the backup folder; for a share, grant it on both the share and the folder. Grant it to that account only, not to Everyone.
Caution: Backup files contain all the data in the database. Keep backup folders restricted to the service account and the administrators who manage backups.
Retry the backup with a corrected path
Changes database stateOnce the path and permissions are right, run the backup again. Adding CHECKSUM lets SQL Server verify pages as it writes them.
BACKUP DATABASE AppDb
TO DISK = N'D:\Backups\AppDb_20261023.bak'
WITH CHECKSUM, STATS = 10;
Investigate the device for hardware errors
Client or network sideFor OS errors such as 21, 23, 27 or 1117, check the Windows System event log and the storage for faults, and test writing a file to the same location. Back up to a different device until the original one is repaired.
Examples
Backing up to a folder that does not exist
-- C:\no_such_folder does not exist on the server
BACKUP DATABASE AppDb
TO DISK = N'C:\no_such_folder\AppDb.bak';
Msg 3201, Level 16, State 1, Line 2 Cannot open backup device 'C:\no_such_folder\AppDb.bak'. Operating system error 3(The system cannot find the path specified.). Msg 3013, Level 16, State 1, Line 2 BACKUP DATABASE is terminating abnormally.
Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.
How to prevent it
Back up to a fixed, documented location that exists on the server, using UNC paths for network targets, and grant the service account access as part of server setup. When you change the service account or move backups, re-test a backup straight away.
Alert on failed backup jobs and on error 3201 or 3013 in the error log, so a broken backup does not go unnoticed until you need to restore. Restore a backup regularly to prove it works.
Common questions
Why does SQL Server say access is denied when I can open the folder?
Because the backup runs as the SQL Server service account, not as you. Give that account (shown in sys.dm_server_services) permission on the folder or share.
Can I back up to a mapped network drive?
Not reliably. Drive letters are mapped per user logon session, so the SQL Server service usually cannot see them. Use the UNC path, such as \\fileserver\sqlbackups\AppDb.bak, and grant the service account access to the share.
What does error 3013 mean after 3201?
Error 3013 only says that the BACKUP or RESTORE statement stopped. The cause is always in the message before it, here the 3201 with its operating system error.
Learn more on CodeWithSQL
Official documentation
- MSSQLSERVER_3201 (Microsoft Learn)
- BACKUP (Transact-SQL)
- Configure Windows service accounts and permissions
Last technically reviewed 23 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.