> [!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.

To help to protect your Microsoft SQL Server databases with Backup and DR,
you can add your SQL Server database host and discover its instances and
databases in the appliance management console. Adding the host and
discovering its databases lets you manage backups, maintain business continuity,
and recover your SQL Server data.

Before you can protect SQL Server databases, complete the following:

- Review your network configuration, including firewall ports. For more
  information, see [SQL database discovery considerations](https://docs.cloud.google.com/backup-disaster-recovery/management-console/configuration/discover-sql-server.md.txt#discover).

- Install the Backup and DR agent on the database hosts.

- Make sure the database permissions are set correctly.

## SQL database discovery considerations

- backup/recovery appliances support Microsoft SQL Server on Microsoft Windows
  server.

- Discovery relies on SQL VSS writer. For the discovery to work correctly, SQL
  VSS writer must be installed and running on the host.

- Appliances can manage Microsoft SQL Servers, SQL instances,
  consistency groups of SQL Server databases, and SQL availability groups.

- For a SQL failover appliance, the discovery needs to be run on
  either the active node---or node IP---or appliance node---or
  appliance IP. Otherwise, clustered databases aren't discovered.

## Add the host

Add the host to the appliance management console. If the host has already been added, then
edit the host and make sure to set all the configurations correctly.

> [!NOTE]
> **Note:** If you have added the Windows server to Backup and DR as a Compute Engine instance or as a VMware VM, then a host for this VM already exists and you don't need to add it again using the following procedure. Instead, find and edit that host.

1. Click **Manage** \> **Hosts** , then click **+ Add Host**.

2. On the **Add Host** page, complete the following:

   - **Name**: Provide the database server name.

   - **IP Address** : Provide the database server IP and click the
     **plus sign (+)**.

   - **Appliances**: Select the checkbox for the appliance.

   - **Host Type** : Make sure this is **Generic**.

3. Click **Add** at bottom right to add the host. The host is added.

4. Right-click the host and select **Edit**.

5. Leave the **Staging Disk Format** as **Block**.

6. Enter the username and password that you set up in
   **Application Discovery Credentials**.

7. Select **Save**.

## Discover SQL Server instances and databases

Use the following instructions to discover SQL Server instances and databases:

1. Click **App Manager** \> **Applications** , select
   **Add Application**.

2. Select **SQL Server** on the **Add Application** page, then select the
   SQL Server database host. If you have many hosts, you can use the
   search feature or use the filter to see only hosts that are managed by
   a specific backup/recovery appliance.

   > [!NOTE]
   > **Note:** When adding SQL instances that participate in Microsoft Server Failover Clusters, either:  
   > Run the wizard once for each node in the cluster, or else  
   > Add all applications and multi-select all nodes at once. With this method, apply protection from the **Applications Listing** view by selecting **Manage Backup Plan** for the SQL instance.

3. Select the host and click **Next**.
   This runs the discovery on the SQL Server host and discovers all SQL Server
   instances and databases running on it.

   > [!NOTE]
   > **Note:** Discovery on any one node adds other nodes of cluster as well.  
   > To discover system DBs, run discovery on each node. System DBs can be protected as part of a SQL instance.  
   > Availability Group databases can be protected as part of a SQL AG application.  
   > You can take a backup of a secondary by specifying the AG backup preference from application advanced settings.  
   > Log truncation on the primary is managed by SQL Server, even when backing up db or logs on a secondary.

## Find the discovered instances and databases in the App Manager

To find the newly-discovered database, go to the **App Manager Applications**
list. All applications known to the appliance management console of all types are listed.
Use the **Type** application filter to show only SQL Server
database instances. The new SQL Server instances and databases appear in the
list as unmanaged---the shield icon.

## 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)

## What's Next

[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)