My backup to a network share fails with error 3201, cannot open backup device, operating system error 5 (Access is denied). I can open the share from my own PC. Why not from SQL Server?
The backup runs as the SQL Server service account, not as you. That account needs rights on the folder and the share.
1. Check the service account in SQL Server Configuration Manager.
2. If it is a local account like NT Service\MSSQLSERVER, it can not access a network share. Use a domain account for the service, or give the computer account of the SQL server rights on the share (for example DOMAIN\SQLSERVER$).
3. Give that account Modify on both the share permissions and the NTFS permissions.
4. Use a UNC path in the backup command (\\server\share\file.bak), not a mapped drive letter, because services do not see your mapped drives.
For a local folder, give the service account Modify on that folder.
Mapped drive was the problem. Using a UNC path with the right permissions now. Thanks.