Views:

Creating a new Deep Security Manager tenant connected to SQL Server Always On Availability Group

  1. Follow the standard instructions to create new tenant in Deep Security Manager web console. After the new tenant has been created, proceed with subsequent instructions below.
  2. Open SQL Server Management Studio (SSMS) and connect to the SQL Availability Group listener using database administrator credential. Notice that there is a new database created but it is not marked as synchronized. In this example, the new database is dsm_1.

    The newly added database is tagged as not synchronized in the SSMS.

  3. Change recovery model of the tenant database from default Simple to Full.

    Right click the tenant database and select Properties. Then, click Options and find the Recovery Model field. Change to Full.

     
    Always On Availability Group only supports the Full recovery model.

    The recovery model field of the new tenant database is changed from Simple to Full

  4. Perform full back up on database.

    Right click the tenant database and select TasksBack Up.

    Perform a full back up for the database under the Tasks option

    The Back-Up Database dialog box displays the database name and back-up destination

  5. Add database to Availability Groups.

    Right click your Availability Groups and select Add Database.

    Choose the tenant database and click Next.

    Right-click to Add Database and initiate the process

    Connect to all existing replica to sync data.

    Add Database to Availability Group dialog box displays Connect to Replicas information

    Select your preferred synchronization method. After the validation is successful, click Finish.

    Alternatively, you may use SQL command below to add database to Availability Group:

    ALTER AVAILABILITY GROUP [YourAvailabilityGroupName] ADD DATABASE [TenantDatabaseName];

  6. Verify that tenant database is now tagged as synchronized.

    The newly added database is now tagged as synchronized in the SSMS.


Deleting existing Deep Security Manager tenant connected to SQL Server Always On Availability Group

  1. Begin by following the standard procedure to delete an existing tenant using the Deep Security Manager web console. Once the tenant status is marked as pending deletion, proceed with the steps outlined below.

    Identify the corresponding tenant database name that will be used in subsequent instructions.

    You can find the database name in Administration page → TenantsDatabase Name column.

    The Deep Security Administration page displays the Database Name of the database to be deleted

     
    It is critical to verify the accuracy of the database name to prevent accidental deletion of the wrong tenant data.

    Open SQL Server Management Studio (SSMS) and connect to the SQL Availability Group listener using database administrator credential.

  2. Expand the Always On High Availability tree. Right click the tenant database that you want to delete then choose Remove Database from Availability Group. In this example, the database to delete is dsm_2.

    The Remove Database from Availability Group option can be found by right-clicking the database name

  3. Deep Security Manager will periodically check for tenant database that has status of pending-for-deletion. After soft deletion time exceeds 7 days, DSM will automatically delete the database in primary replica.
  4. After the tenant database is deleted from the primary replica, it may still exist in the secondary replica.

    The deleted database in the primary replica has to be deleted manually in the secondary replica

    Connect to secondary replica and manually delete the replica database.

 

Notes and Best Practices

  • Always perform backups before adding/removing databases from the Availability Group.
  • Ensure all replicas are healthy before making changes.