> [!CAUTION]
> **Caution:** Support for backing up and restoring workloads managed using the legacy appliance management console is deprecated. For more information, see [Feature deprecations](https://docs.cloud.google.com/backup-disaster-recovery/docs/deprecations.md.txt) in the Backup and DR documentation.

Microsoft SQL Server requires specific user roles to perform specific
operations. To perform Backup and DR capture, restore, unmount,
delete, and virtual application mount operations on a SQL Server database, you
must provide credentials for a Windows user---a local user or a domain
user---who has a role with sufficient SQL privileges to perform the
operation.

This section details the user roles required to perform capture, restore,
unmount, delete, and virtual application mount operations from a
backup/recovery appliance. The recommended roles presented in this section are
based on Microsoft's best practices for accessing SQL Server databases.

Before you begin, it's a good idea to review [Backup and DR for SQL
Server databases](https://docs.cloud.google.com/backup-disaster-recovery/docs/concepts/sql-intro).

> [!NOTE]
> **Note:** Creating users and assigning roles must be done by qualified system and database administrators. If users are improperly defined, or roles are improperly applied, the result can lead to Backup and DR job failure, security violations, and possible data loss.

## Windows local administrator user

To perform capture, restore, unmount delete, and virtual application mounts, the
Backup and DR agent must be installed with the credentials of a
Microsoft Windows user who has sufficient privileges in the SQL environment. The
Windows user must be assigned a specific role or roles. The Microsoft Windows
user can be a newly created or existing user.

## Required SQL roles for the Windows user

A Windows local administrator user assigned to the `sysadmin` server role has
all necessary permissions to perform Backup and DR capture, restore
and virtual application mounts.

If the `sysadmin` server role is deemed too liberal, then assign a
Windows user the following roles:

- `dbcreator` server role

- `db_backupoperator` database role

- `db_owner` database role

In addition, such users must also be assigned the following securables:

- View any database

- Create any database

- Alter any database

- Connect SQL

The following sections detail where to enter the Windows local admin's username
and password to perform specific Backup and DR SQL related operations.

> [!NOTE]
> **Note:** In the following procedures, when entering user names, in most cases the domain name and user name---domain or username---format is sufficient. In rare cases, entering the domain name or username returns the error `Logon failure: unknown user name or bad password [1326]` In such cases, use the fully qualified domain name format `(username@fqdn</span>_)` to address the problem.

### Credentials for capturing SQL Server database logs

When applying a backup plan policy template to a SQL Server database, if the
template contains a policy that captures database logs you must enter
credentials of a Windows user assigned the proper roles in the management
console in the application's backup plan application details and settings.

> [!NOTE]
> **Note:** Credentials are required for logs; they are not required if only databases are being captured.

### Credentials for restoring a Microsoft SQL Server database

When restoring SQL Server databases from the appliance management console, in
the **Restore** dialog, enter credentials of a Windows user assigned the
proper roles.

### Credentials for mounting a SQL Server database as a virtual application

A virtual application mount mounts a SQL Server database as a virtual
application. When performing a virtual application mount of a SQL Server
database from a backup/recovery appliance, the user must be assigned a role that
allows both the ability to mount and unmount---detach---the SQL Server
database.

When performing a virtual application mount, in the **Mount** dialog
**Advanced options**, enter the credentials of a Windows user assigned the
proper roles.

## The Backup and DR Microsoft SQL Server DBA guide

This page is one in a series of pages specific to protecting and recovering
Microsoft SQL Server databases with Backup and DR.
You can find additional information at:

- [Backup and DR for Microsoft SQL Server Databases](https://docs.cloud.google.com/backup-disaster-recovery/management-console/concepts/backupdr-for-sql-server.md.txt)
- [Prepare SQL Server databases for Backup and DR](https://docs.cloud.google.com/backup-disaster-recovery/management-console/configuration/prepare-sql-server.md.txt)
- [Add a SQL Server database host and discover databases](https://docs.cloud.google.com/backup-disaster-recovery/management-console/configuration/discover-sql-server.md.txt)
- [Configure backup plans for Microsoft SQL Server instances and databases](https://docs.cloud.google.com/backup-disaster-recovery/management-console/backup/back-up-sql-server.md.txt)
- [Application details and settings for Microsoft SQL Server instances and databases](https://docs.cloud.google.com/backup-disaster-recovery/management-console/backup/app-details-settings-sql-server.md.txt)
- [Mount a SQL Server database](https://docs.cloud.google.com/backup-disaster-recovery/management-console/access-data/mount-sql-server.md.txt)
- [Mount databases into SQL Always On Availability Groups](https://docs.cloud.google.com/backup-disaster-recovery/management-console/access-data/mount-sql-server-aag.md.txt)
- [Manage an active mount](https://docs.cloud.google.com/backup-disaster-recovery/management-console/access-data/manage-active-mounts.md.txt)
- [Migrate a SQL Server database](https://docs.cloud.google.com/backup-disaster-recovery/management-console/access-data/mount-and-migrate-sql-server-2.md.txt)
- [Clone SQL Server databases](https://docs.cloud.google.com/backup-disaster-recovery/management-console/access-data/clone-sql-server.md.txt)
- [Recover SQL Server backups](https://docs.cloud.google.com/backup-disaster-recovery/management-console/restore-data/restore-sql-server.md.txt)