Solved

Veeam SQL Agent Access Denied Error

  • 19 December 2023
  • 8 comments
  • 518 views

Userlevel 1

I’m trying to set up the Veeam SQL Agent and have it up and running on my SQL server, but when I try to backup a DB I get the following error:

[ERROR]  Failed to backup database model. Error:  Error code: 0x80070005 Access denied. You must be logged in as a Windows administrator to create a virtual device. Failed to start VDI backup.

I’m logged in as a domain administrator on the SQL server and am running the backup using a domain admin credential as well.  So I’m not sure why this is failing.

icon

Best answer by Steve B 20 December 2023, 22:40

View original

8 comments

Userlevel 7
Badge +20

I would check the logs to see what might be causing the backup failure - C:\ProgramData\Veeam\Backup

Hard to say exactly what is causing that based on the credentials you are using.

Userlevel 7
Badge +17

Do any of those accounts have access to any of the DBs you’re backing up though? Have you tried SA accounts?

Userlevel 7
Badge +7

As @coolsport00 said, the account must have access to the Database to be able to back it up. Usually, permissions have to be delegated to the account being used to backup the SQL Server through SQL Server Management Studio

Userlevel 2
Badge

You cold set the account with sysadmin rights within SSMS as mentioned by @dips or if you want more granular permissions, see below from the help center:

Application

Required Permission

Microsoft SQL Server

To back up Microsoft SQL Server data, the user whose account you plan to use must be:

  • Local Administrator on the target VM.
  • System administrator (has the Sysadmin role) on the target Microsoft SQL Server.

If you need to provide minimal permissions, the account must be assigned the following roles and permissions:

  • SQL Server instance-level role: public and dbcreator.
  • Database-level roles and roles for the model system database: db_backupoperatordb_denydatareaderpublic;
    for the master system database — db_backupoperatordb_datareaderpublic;
    for the msdb system database — db_backupoperatordb_datareaderpublic, db_datawriter.
  • Securables: view any definitionview server state, connect SQL.
Userlevel 7
Badge +8

Hi @Steve B  to perform SQL backup aware, as already written, the user must be part of either the Local Administrator where the MS SQL Database resides and automatically has administrator privileges built in to SQL.
Or create\specify a dedicated user with the grants reported by @keironbell 

regards

Userlevel 1

Thanks all - how I got this to work (I was already a member of the local admins group on the SQL server) was to run the Backup SQL Veeam app as an administrator (right click - run as administrator).  Then everything worked great! :) 

Userlevel 7
Badge +17

Awesome. Thank you for sharing what worked for you 👍🏻

Userlevel 7
Badge +20

Great to hear you were able to get it working Steve.

Comment