Error 3201 Operating system error 5(Access is denied.) Creating backup on network drive

Posted on

Question :

Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 
     '\nst-shantanugc$Dummy Db Backupdummydb.bak'. 
Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

What all permissions do I need to assign to drive or pc where I want to take backup of my database.

Answer :

The SQL Service account should have write access to the folder to be able to write the backup there.

Depending if you also want to create subdirectories, overwrite backups or delete old backups you need appropriate rights for that too.

Typically the SQL Server service account does not have access to administrative shares like c$ – unless you are running your SQL Server service using an account that is a domain administrator (or a domain account with administrative rights on the other box) – which you definitely should not do.

Try using a defined share rather than the built-in $ shares, and giving the SQL Server service account (which can be a domain account but not in a highly-privileged role) explicit read/write privileges on the share and on the underlying NTFS.

Leave a Reply

Your email address will not be published. Required fields are marked *