SQL Database backup fails with error "An error occurred on a query to database."

  • Modified Date:
  • Article ID:000042042


SQL Database backup fails with error "An error occurred on a query to database."


Error Message

Backup -<Server name>
V-79-65323-916 - An error occurred on a query to database .
V-79-65323-916 - The server principal "<Domain name>\<user name>" is not able to access the database "<database name>" under the current security context.



The above error occurs in the job log while backing up SQL databases if the user account used for backing up the SQL databases does not have proper privileges.



The backup exec account should have the following rights for backing and restoring SQL databases:
1.  System Administrator role on the SQL instance. 
2.  db_datareader and db_datawriter on the master database of the SQL instance.
To give these rights follow the steps given below:
1) On the SQL server open the Microsoft SQL server Management Studio and connect to the SQL instance.
2) Right Click on "Security" and select New =>  Login (Figure 1).
Figure 1 :
3) On the "Login-New" window enter the Login name (backup exec account ) (Figure 2)
Figure 2 :
4) On "Select a page" option  select "Server Roles" ,Select the "sysadmin" role (Figure 3)
Figure 3 :
5) On the same "Select a page" option  select "User Mapping" (Figure 4)
6) Under "Users mapped to this login" select "master" database (Figure 4)
7) Under "Database role membership for: master" select "db_datareader" and "db_datawriter" (Figure 4)
Figure 4 :


Terms of use for this information are found in Legal Notices.



Did this article answer your question or resolve your issue?


Did this article save you the trouble of contacting technical support?


How can we make this article more helpful?

Email Address (Optional)