Contents

Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide PDF

1 of 290
1 of 290

Summary of Content for Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide PDF

Dell EMC PowerProtect Microsoft Application Agent Version 19.1

SQL Server User Guide 302-005-562

REV 02

October 2019

Copyright 2014-2019 Dell Inc. or its subsidiaries. All rights reserved.

Dell believes the information in this publication is accurate as of its publication date. The information is subject to change without notice.

THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS-IS. DELL MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND

WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF

MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. USE, COPYING, AND DISTRIBUTION OF ANY DELL SOFTWARE DESCRIBED

IN THIS PUBLICATION REQUIRES AN APPLICABLE SOFTWARE LICENSE.

Dell Technologies, Dell, EMC, Dell EMC and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be the property

of their respective owners. Published in the USA.

Dell EMC Hopkinton, Massachusetts 01748-9103 1-508-435-1000 In North America 1-866-464-7381 www.DellEMC.com

2 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

9

11

Preface 13

Configuring the Microsoft Application Agent 17

Configuring the Data Domain System 19 Installing and upgrading the Data Domain operating system............................. 20 Configuring the Data Domain system................................................................20

Opening ports in a firewall to enable Data Domain backups..................20 Enabling Data Domain Boost on a Data Domain system .......................20 Configuring the Data Domain Boost server.......................................... 23 Data Domain replication....................................................................... 30 Configuring usage limits of Data Domain resources.............................. 31

Configuring the Data Domain Cloud Tier for data movement to the cloud.........34 Setting up the DD Cloud Tier policy for data movement to the cloud...35

Distributed segment processing........................................................................36 Distributed segment processing enabled mode.................................... 36 Distributed segment processing disabled mode....................................37

Advanced load balancing and link failover..........................................................37 Configuration restrictions.................................................................... 38

Encrypted managed file replication................................................................... 38 Data Domain High Availability............................................................................38 Validating the Data Domain system...................................................................39 Troubleshooting the Data Domain system.........................................................39

Configuring Application Direct 41 Overview of Application Direct with SQL Server...............................................42 Architecture of the Microsoft application agent for Application Direct with SQL Server............................................................................................................... 43 SQL Server transparent data encryption...........................................................44 Configure a user with the required privileges for SQL Server Application Direct operations.........................................................................................................45

Required privileges for backup and recovery of a stand-alone server...45 Required privileges for backup and recovery of an Always On availability group................................................................................................... 45 Required privileges to perform backup and recovery of a Failover Cluster Instance or Always On Failover Cluster Instance......................46 Required privileges to view and delete save sets with the Application Direct expiry tool (ddbmexptool) ........................................................ 46 Required user privileges to manage save sets and list client and storage unit information with msagentadmin.exe .............................................46 Adding a user to a Windows policy....................................................... 46

Create a configuration file.................................................................................47 Configuring the lockbox.................................................................................... 49

Figures

Tables

Part 1

Chapter 1

Chapter 2

CONTENTS

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 3

Commands to create and manage the lockbox..................................... 49 Create a lockbox...................................................................................51

Configure prerequisites to back up and restore Always On availability groups.. 52 Parsing TSQL operational output into multiple tables....................................... 54

Configuring Storage Direct 57 Overview of Storage Direct with SQL Server....................................................58 Supported configurations of Storage Direct with SQL Server.......................... 59 Configuring Storage Direct with RecoverPoint................................................. 59

Storage Direct with RecoverPoint overview........................................ 60 Storage Direct with RecoverPoint connectivity requirements.............. 61 Storage Direct with RecoverPoint architecture................................... 62 Create a Storage Direct with RecoverPoint configuration file..............63

Configuring Storage Direct with VMAX............................................................ 66 Storage Direct with VMAX overview....................................................66 Storage Direct with VMAX connectivity requirements......................... 68 Storage Direct with VMAX architecture...............................................69 VMAX replication................................................................................. 69 Install and configure the VMAX Solutions Enabler................................72 Create a Storage Direct with VMAX configuration file......................... 73

Configuring the lockbox.................................................................................... 76 Commands to create and manage the lockbox..................................... 77 Create a lockbox.................................................................................. 79

Configure prerequisites to back up and restore Always On availability groups.. 80 Parsing TSQL operational output into multiple tables....................................... 80

Backing Up SQL Server 83

Backing Up SQL Server with Application Direct 85 Overview of Application Direct with SQL Server backups.................................86

Federated backups of Always On availability groups............................ 86 Best practices to back up SQL Server with Application Direct.......................... 87 Naming conventions for backups with Application Direct..................................88 Circumstances that promote SQL Server backups to level full .........................89 Scheduling backup jobs.....................................................................................89

Scheduling SQL Server backups by using SQL Server Agent............... 89 Scheduling SQL Server backups by using Windows Task Scheduler.... 96

Performing manual backups ............................................................................. 97 Perform backups with the Microsoft app agent for Application Direct SSMS plug-in....................................................................................... 97 Back up SQL Server with the Application Direct backup command.... 104 Perform backups with T-SQL scripts................................................... 111

Listing backups................................................................................................ 115 List backups and save files with the msagentadmin administration command............................................................................................ 115 List backups with the Application Direct expiry tool............................ 118

Move and recall save sets on a Data Domain Cloud Tier.................................. 120 Move save sets to the Data Domain Cloud Tier...................................120 Recall save sets from the Data Domain Cloud Tier.............................. 121 Optional parameters for the msagentadmin administration command. 121

Deleting backups............................................................................................. 123 Delete backups with the msagentadmin administration command...... 123 Delete backups with the ddbmexptool expiry tool...............................125

Chapter 3

Part 2

Chapter 4

Contents

4 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Backing Up SQL Server with Storage Direct 131 Overview of SQL Server backups with Storage Direct.....................................132 Storage Direct backup workflow......................................................................132

Storage Direct with RecoverPoint backup workflow...........................132 Storage Direct with VMAX backup workflow...................................... 133

Best practices to back up SQL Server with Storage Direct............................. 133 RecoverPoint on XtremeIO backup considerations.......................................... 134 Naming conventions for backups with Storage Direct..................................... 135 Backing up SQL Server with Storage Direct.................................................... 136

Back up SQL Server with the Microsoft app agent for Storage Direct SSMS plug-in..................................................................................... 136 Back up SQL Server with the Storage Direct backup command......... 144 Back up SQL Server with T-SQL scripts............................................. 147

List backups with the msagentadmin command...............................................148 Examples of the msagentadmin list command.....................................149 Optional parameters to list backups with the msagentadmin command .. 149

Deleting backups..............................................................................................151 Delete backups with the msagentadmin command.............................. 151 Delete backups using T-SQL scripts................................................... 153

Restoring SQL Server 155

Restoring Application Direct Backups 157 Best practices to restore SQL Server with Application Direct......................... 158 Restoring SQL Server databases .................................................................... 158

Prerequisites...................................................................................... 158 Restore a database with the Microsoft app agent for Application Direct plug-in................................................................................................ 159 Perform database restores with the Microsoft application agent for Application Direct recover command.................................................. 167 Perform database restores with T-SQL scripts...................................174

Performing table-level recovery.......................................................................177 Table-level restore workflow...............................................................177 Launching the Microsoft app agent for vProxy Engine SSMS plug-in.178 Configure general table restore settings............................................. 178 Configure optional table restore settings............................................180 Monitor the table restore mount operation .........................................181 Restore table-level data using ItemPoint............................................ 182

Performing SQL Server disaster recovery....................................................... 184 Perform SQL Server disaster recovery............................................... 184 Perform disaster recovery from the Data Domain Cloud Tier..............184

Restoring Storage Direct Backups 187 ProtectPoint restore workflow........................................................................ 188

Storage Direct with RecoverPoint restore workflow...........................188 Storage Direct with VMAX restore workflow...................................... 188

Best practices to restore SQL Server with Storage Direct.............................. 189 Restore a backup from a secondary Data Domain system............................... 190 Restoring SQL Server databases..................................................................... 192

Restoring SQL Server databases using the Microsoft app agent for Storage Direct SSMS plug-in..............................................................192

Chapter 5

Part 3

Chapter 6

Chapter 7

Contents

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 5

Restore SQL Server databases using the Storage Direct restore command............................................................................................199 Restore SQL Server databases with T-SQL scripts............................204

Performing rollback restores...........................................................................205 Considerations for rollback restores...................................................205 Relocating volumes to an alternate LUN during a VMAX rollback restore .......................................................................................................... 205 Perform rollback restores with the Microsoft app agent for Storage Direct SSMS plug-in.......................................................................... 206 Perform rollback restores with the Storage Direct restore command. 212 Restore SQL Server volumes with T-SQL scripts............................... 215 Confirming the status of a rollback restore.........................................216

Restore an availability group to an alternate instance......................................216 Restoring SQL Server table-level data.............................................................217

Restore SQL Server table-level data with the Microsoft app agent for Storage Direct SSMS plug-in..............................................................217 Restore SQL Server table-level data with Storage Direct commands.224 Managing mounted backups ..............................................................227

Performing SQL Server disaster recovery with Storage Direct....................... 229

Restoring Virtual Machine Backups with vProxy Engine 231 Overview of SQL Server virtual machine restore operations .......................... 232 Prerequisites...................................................................................................232 Restrictions.....................................................................................................233 Restoring SQL Server databases to a virtual machine.....................................233

Restore SQL Server databases with the vProxy Engine SSMS plug-in.... 234 Restore a SQL Server database with the vProxy Engine recover command........................................................................................... 242

Performing SQL Server table-level recovery to a virtual machine................... 248 Restore SQL Server tables with the vProxy Engine SSMS plug-in.....248 Restore SQL Server tables with the vProxy Engine recover command.... 254

Performing an instant access recovery........................................................... 258 Instant access recovery overview ..................................................... 258 Instant access recovery use cases..................................................... 258 Perform an instant access restore with the vProxy Engine SSMS plug- in........................................................................................................259

Troubleshooting 267

Troubleshooting Resources 269 Error codes in the msagentadmin administration command output................. 270 Expiry tool command return (error) codes...................................................... 270

Troubleshooting Application Direct Issues 273 SQL Server Management Studio plug-in is hidden.......................................... 274 Instant file initialization warning appears.........................................................274 Application Direct full backup might fail.......................................................... 274 Restore with tail-log backup fails when full backups are tiered to the cloud....275 Issues encountered with the backup discovery tool........................................ 275

Chapter 8

Part 4

Chapter 9

Chapter 10

Contents

6 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Troubleshooting Storage Direct Issues 277 Troubleshooting mount failures.......................................................................278 SQL Server Management Studio plug-in is hidden.......................................... 279 Failed to set up SymAPi handle: Unable to list VMax arrays : SYMAPI_C_NO_SYMM_DEVICES_FOUND...................................................280 Rollback restore fails with the error "The process cannot access the file"......280 ResyncLuns: SymSnapvxControl failed for Target Device = 01441. Error: The Device(s) is (are) already in the desired state or mode....................................281 Rollback restore fails when the VMAX LUNs are unavailable........................... 281 The log file contains messages about VSS snapshot failure with code 0x80042306................................................................................................... 282 Registry keys are overwritten when the Solutions Enabler is installed after the Microsoft application agent............................................................................ 282 Remove the link between the source devices and the backup (FTS) devices on Data Domain and terminate the snapvx session.............................................. 283

Troubleshooting vProxy Engine Issues 285 Configuring the debug level with the msagentcon.exe program......................286 Restore fails when a full backup has been moved to the cloud........................286 Restore with tail-log backup fails when full backups are tiered to the cloud....287 Application-aware virtual machine full backup might fail................................. 287 Full backup might fail when a virtual machine has many SQL databases......... 288 SQL AAG transaction log backup might not be performed.............................. 288 Restore keeps running when the backup is in the cloud.................................. 288 Transaction log backup depends on last backup before upgrade.....................289 Unable to protect a virtual machine with application agent installed in Application Direct mode..................................................................................289

Chapter 11

Chapter 12

Contents

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 7

Contents

8 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

The Microsoft application agent for Application Direct with SQL Server general architecture...................................................................................................................... 43 The Microsoft application agent for Application Direct with SQL Server - CLR Assembly architecture...................................................................................................................... 44 Storage Direct with RecoverPoint environment................................................................ 61 Storage Direct with RecoverPoint architecture................................................................ 62 Storage Direct with VMAX on the primary and secondary sites........................................ 67 Storage Direct with multiple VMAX arrays on the same site............................................. 68 Storage Direct with VMAX architecture............................................................................69 Storage Direct backup to a secondary Data Domain in an SRDF configuration................. 70 Storage Direct backup to a primary or secondary Data Domain in an SRDF configuration .......................................................................................................................................... 71 Federated backup command and data flow....................................................................... 87 Application Direct - Backup-General page........................................................................ 98 Data Domain connection list and lockbox settings........................................................... 100 Data Domain - Add Data Domain server details................................................................100 Application Direct - Backup-Options page....................................................................... 102 Application Direct - Backup-Monitor page.......................................................................104 Storage Direct - Backup-General page............................................................................ 137 Storage Direct - Backup-Options page............................................................................ 138 Data Domain connection list and lockbox settings........................................................... 139 Storage Direct - Add Data Domain Server details............................................................ 140 Data Domain server name................................................................................................ 140 RecoverPoint connection list and lockbox settings...........................................................141 Storage Direct - Add RecoverPoint Server details........................................................... 142 Storage Direct - Backup-Monitor page............................................................................ 144 Application Direct - Database Restore-General page.......................................................160 Specifying the restore point............................................................................................. 161 Application Direct - Database Restore-Files page............................................................ 163 Application Direct - Database Restore-Options page.......................................................164 Application Direct - Database Restore-Monitor page.......................................................167 Application Direct - Table Restore-General page............................................................. 179 Application Direct - Table Restore-Options page.............................................................180 Application Direct - Table Restore-Monitor page.............................................................182 ItemPoint Data Wizard: select the source files................................................................ 183 ItemPoint Data Wizard: select the target server.............................................................. 183 Storage Direct - Database Restore-General page............................................................193 Specifying the restore point............................................................................................ 194 Storage Direct - Database Restore-Files page.................................................................195 Microsoft app agent for Storage Direct - Database Restore-Options page..................... 196 Storage Direct - Database Restore-Monitor page........................................................... 199 Storage Direct - Volume Restore page............................................................................207 Storage Direct - Volume Restore-Files page................................................................... 209 Storage Direct - Volume Restore-Options page...............................................................210 Storage Direct - Volume Restore-Monitor page............................................................... 211 Storage Direct - Table Restore General page.................................................................. 219 Microsoft app agent for Storage Direct: Table Restore-Options page............................ 220 Storage Direct - Table Restore-Monitor page................................................................. 222 ItemPoint Data Wizard: select the source files................................................................223 ItemPoint Data Wizard: select the target server............................................................. 224 ItemPoint Data Wizard: select the source files................................................................226 ItemPoint Data Wizard: select the target server............................................................. 227 vProxy Engine: Database Restore General page..............................................................235

1

2

3 4 5 6 7 8 9

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

FIGURES

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 9

Specifying the restore point............................................................................................236 vProxy Engine: Database Restore Files page...................................................................238 vProxy Engine: Database Restore Options page............................................................. 239 vProxy Engine: Database Restore Monitor page............................................................. 242 vProxy Engine: Table Restore General page....................................................................249 vProxy Engine: Table Restore Options page................................................................... 250 vProxy Engine: Table Restore Monitor page................................................................... 252 ItemPoint Data Wizard: select the source files................................................................253 ItemPoint Data Wizard: select the target server............................................................. 253 ItemPoint Data Wizard: select the source files................................................................256 ItemPoint Data Wizard: select the target server............................................................. 257 vProxy Engine: Instant Access General page.................................................................. 260 Specifying the access point.............................................................................................261 vProxy Engine: Instant Access Options page.................................................................. 262 vProxy Engine: Instant Access Active Mounts page........................................................264 vProxy Engine: Instant Access Active Mounts page........................................................265

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

Figures

10 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Revision history................................................................................................................. 13 Style conventions.............................................................................................................. 14 General configuration file parameters............................................................................... 47 Primary system configuration file parameters................................................................... 47 Network connection types in a Storage Direct with RecoverPoint environment................61 General configuration file parameters............................................................................... 63 Primary system configuration file parameters...................................................................63 RecoverPoint cluster configuration file parameters.......................................................... 65 Storage Direct with VMAX technology............................................................................. 66 Network connection types in a Storage Direct with VMAX environment...........................68 General configuration file parameters............................................................................... 73 Primary system configuration file parameters................................................................... 74 VMAX configuration file parameters................................................................................. 75 Supported special characters ...........................................................................................88 Supported special characters ......................................................................................... 135 Restore parameters to point to a secondary DD system...................................................191 Return codes and description..........................................................................................270 Return codes and description..........................................................................................270

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

TABLES

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 11

Tables

12 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Preface

As part of an effort to improve product lines, periodic revisions of software and hardware are released. Therefore, all versions of the software or hardware currently in use might not support some functions that are described in this document. The product release notes provide the most up-to-date information on product features.

If a product does not function correctly or does not function as described in this document, contact a technical support professional.

Note: This document was accurate at publication time. To ensure that you are using the latest version of this document, go to the Support website https://www.dell.com/support.

Purpose

This document describes how to configure and use the PowerProtect Microsoft application agent to back up and restore Microsoft SQL Server.

Audience

This document is intended for the user who configures and uses the Microsoft application agent to back up and restore Microsoft SQL Server.

Revision history

The following table presents the revision history of this document.

Table 1 Revision history

Revision Date Description

02 October 1, 2019 Updated the troubleshooting topic "Issues encountered with the backup discovery tool" in Chapter 10.

01 July 25, 2019 Initial release of this document for Microsoft application agent 19.1.

Related documentation

The following publications provide additional information:

l PowerProtect Microsoft Application Agent Installation Guide

l PowerProtect Microsoft Application Agent Release Notes

l PowerProtect Microsoft Application Agent Exchange Server User Guide

l PowerProtect ItemPoint for Microsoft SQL Server User Guide

l PowerProtect ItemPoint for Microsoft Exchange Server User Guide

l PowerProtect Database Application Agent Installation and Administration Guide

l PowerProtect Database Application Agent Release Notes

l DDBEA section of the eLab Navigator at https://elabnavigator.emc.com/eln/ modernHomeDataProtection

l Data Domain Operating System documentation

l PowerProtect Storage Direct Primary and Protection Storage Configuration Guide

l PowerProtect Storage Direct Solutions Guide

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 13

l RecoverPoint documentation

l XtremIO documentation

l VMAX documentation

Special notice conventions that are used in this document

The following conventions are used for special notices:

NOTICE Identifies content that warns of potential business or data loss.

Note: Contains information that is incidental, but not essential, to the topic.

Typographical conventions

The following type style conventions are used in this document:

Table 2 Style conventions

Bold Used for interface elements that a user specifically selects or clicks, for example, names of buttons, fields, tab names, and menu paths. Also used for the name of a dialog box, page, pane, screen area with title, table label, and window.

Italic Used for full titles of publications that are referenced in text.

Monospace Used for:

l System code

l System output, such as an error message or script

l Pathnames, file names, file name extensions, prompts, and syntax

l Commands and options

Monospace italic Used for variables.

Monospace bold Used for user input.

[ ] Square brackets enclose optional values.

| Vertical line indicates alternate selections. The vertical line means or for the alternate selections.

{ } Braces enclose content that the user must specify, such as x, y, or z.

... Ellipses indicate non-essential information that is omitted from the example.

You can use the following resources to find more information about this product, obtain support, and provide feedback.

Where to find product documentation

l https://www.dell.com/support

l https://community.emc.com

Where to get support

The Support website https://www.dell.com/support provides access to product licensing, documentation, advisories, downloads, and how-to and troubleshooting information. The information can enable you to resolve a product issue before you contact Support.

To access a product-specific page:

Preface

14 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

1. Go to https://www.dell.com/support.

2. In the search box, type a product name, and then from the list that appears, select the product.

Knowledgebase

The Knowledgebase contains applicable solutions that you can search for either by solution number (for example, KB000xxxxxx) or by keyword.

To search the Knowledgebase:

1. Go to https://www.dell.com/support.

2. On the Support tab, click Knowledge Base.

3. In the search box, type either the solution number or keywords. Optionally, you can limit the search to specific products by typing a product name in the search box, and then selecting the product from the list that appears.

Live chat

To participate in a live interactive chat with a support agent:

1. Go to https://www.dell.com/support.

2. On the Support tab, click Contact Support.

3. On the Contact Information page, click the relevant support, and then proceed.

Service requests

To obtain in-depth help from Licensing, submit a service request. To submit a service request:

1. Go to https://www.dell.com/support.

2. On the Support tab, click Service Requests.

Note: To create a service request, you must have a valid support agreement. For details about either an account or obtaining a valid support agreement, contact a sales representative. To get the details of a service request, in the Service Request Number field, type the service request number, and then click the right arrow.

To review an open service request:

1. Go to https://www.dell.com/support.

2. On the Support tab, click Service Requests.

3. On the Service Requests page, under Manage Your Service Requests, click View All Dell Service Requests.

Online communities

For peer contacts, conversations, and content on product support and solutions, go to the Community Network https://community.emc.com. Interactively engage with customers, partners, and certified professionals online.

How to provide feedback

Feedback helps to improve the accuracy, organization, and overall quality of publications. You can send feedback to DPAD.Doc.Feedback@emc.com.

Preface

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 15

Preface

16 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

PART 1

Configuring the Microsoft Application Agent

This part includes the following chapters:

Chapter 1, "Configuring the Data Domain System"

Chapter 2, "Configuring Application Direct"

Chapter 3, "Configuring Storage Direct"

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 17

Configuring the Microsoft Application Agent

18 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 1

Configuring the Data Domain System

Note: When the Microsoft application agent is deployed with PowerProtect Data Manager or PowerProtect X400, refer to the PowerProtect Data Manager or PowerProtect X400 documentation for information about the protection target configuration.

When the Microsoft application agent is added to a PowerProtect centralized protection lifecycle group, PowerProtect Data Manager can provision the storage on the Data Domain or PowerProtect X400 system and manage the replication policies.

This chapter includes the following sections:

l Installing and upgrading the Data Domain operating system..................................................20 l Configuring the Data Domain system.................................................................................... 20 l Configuring the Data Domain Cloud Tier for data movement to the cloud............................. 34 l Distributed segment processing............................................................................................ 36 l Advanced load balancing and link failover.............................................................................. 37 l Encrypted managed file replication....................................................................................... 38 l Data Domain High Availability................................................................................................ 38 l Validating the Data Domain system....................................................................................... 39 l Troubleshooting the Data Domain system............................................................................. 39

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 19

Installing and upgrading the Data Domain operating system The Data Domain Operating System Installation Guide provides information about how to install and upgrade the Data Domain (DD) operating system.

You require a license to implement many of the features on a Data Domain system.

Note: You require the Application Direct license to use the Microsoft application agent software. You also require a replication license for both the source and destination Data Domain systems to use the replication feature.

Contact the Data Domain sales representative for more information and to purchase licensed features.

The Data Domain Operating System Administration Guide provides information about all the licensed features, and how to display and enable Data Domain licenses. The DDBEA section of the eLab Navigator at https://elabnavigator.emc.com/eln/modernHomeDataProtection lists the versions of Data Domain OS that are supported with the Microsoft application agent.

Configuring the Data Domain system This section describes how to configure the Data Domain system.

The Data Domain Operating System Command Reference Guide provides complete descriptions of the commands used in these sections.

Opening ports in a firewall to enable Data Domain backups

Note: This topic is relevant only if you use an Ethernet connection for backup and restore operations with the Microsoft application agent.

Ensure that the following ports are open on the firewall to enable the Application Direct backups and optimized duplication.

l TCP 2049 (NFS)

l TCP 2051 (Replication)

l TCP 111 (NFS portmapper)

l TCP xxx (select a port for NFS mountd, where the default MOUNTD port is 2052)

Enabling Data Domain Boost on a Data Domain system Every Data Domain system that supports DD Boost must have a unique name. You can use the DNS name of the Data Domain system, which is always unique.

About this task

Enable DD Boost on a Data Domain system by using one of the following methods:

l The ddboost enable command

l Data Domain System Manager on the Data Management > DD Boost page The Data Domain Operating System Administration Guide provides information.

The Data Domain Operating System Command Reference Guide provides more information about the commands used in this procedure.

Procedure

1. On the Data Domain system, log in as an administrative user.

Configuring the Data Domain System

20 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

2. Verify whether you have enabled the file system, and the file system is running, by running the following command:

filesys status

To enable the file system, run the following command:

filesys enable

3. Verify whether you have enabled the DD Boost license by running the following command:

license show

To add the DD Boost license by using the license key from the Data Domain installation package, run the following command:

license add license-key

4. Configure the DD Boost username and password for the Data Domain system.

You can configure only one user for DD Boost access on a Data Domain system at a time. The username and password are case-sensitive.

Configure the username and the password by running the following commands:

user add username password password

ddboost set user-name username

5. Enable Data Domain Boost by running the following command:

ddboost enable

Changing Data Domain Boost access rights When you enable the Data Domain Boost service for the first time on a Data Domain system, all database servers can access the service by default.

Use the ddboost access command to override this default, and restrict access to specific database servers.

For example, to remove the default access permission for all servers and add new access permissions for two specific database servers, dbserver1.datadomain.com and dbserver2.datadomain.com, run the following commands:

# ddboost disable # ddboost access del # ddboost clients add dbserver1.datadomain.com dbserver2.datadomain.com # ddboost enable

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 21

The Data Domain Operating System Command Reference Guide provides information about these commands.

These commands establish the access controls that enable only the dbserver1.datadomain.com and dbserver2.datadomain.com database servers to access the DD Boost service.

Note: Before you configure backups, add the database server host that contains the Microsoft application agent software to a host access group.

If these commands fail to establish access controls, rerun the ddboost enable command to configure the default access control that enables all hosts to access the DD Boost service. If the commands have established access controls, rerunning the ddboost enable command enables them. The ddboost enable command does not modify the access control list.

Consider the following guidelines when you change the Data Domain Boost access rights:

l Ensure that no backup operations are running to the Data Domain system. Run the ddboost disable command to prevent the backup operations.

Note: When you disable DD Boost, you disable the data access to all database servers.

l Specify only a fully qualified domain name, IP address, or resolvable DNS name for the client.

l If you have changed or deleted a username, the change in access rights does not affect any current operation. For example, deleting the current clients from the Data Domain Boost access list by running the ddboost access del command does not stop a backup that is in progress. The current operations do not fail because of the change in access rights.

l After you change the access rights, run the ddboost enable command to re-enable Data Domain Boost and permit operations that are relevant to the changed access rights.

You can run the ddboost clients show config command to verify which database servers have DD Boost access rights. If the command output is *, all database servers have the access rights. For example:

# ddboost clients show config

DD Boost access allowed from the following clients *

# ddboost clients show config

DD Boost access allowed from the following clients: aehdb2 aehdb2.datadomain.com aehdb3 aehdb3.datadomain.com aehdb4 aehdb4.datadomain.com aehdb5 aehdb5.datadomain.com

Verify the active client connections by running the following command:

# ddboost show connections

Configuring the Data Domain System

22 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configuring the Data Domain Boost server The following sections explain how to configure the Data Domain Boost server.

Creating storage units Create one or more storage units on each Data Domain system that you use with the Microsoft application agent.

About this task

Ensure that you use a unique storage unit name on a single Data Domain system. However, you can use the same storage unit name on more than one Data Domain system.

Note: Storage unit names are case-sensitive.

You must provide the storage unit name when you perform the backup and restore operations with the Microsoft application agent.

You can create a storage unit by using one of the following methods:

l The ddboost storage-unit command

l Data Domain System Manager on the Data Management > DD Boost page The Data Domain Operating System Administration Guide provides information.

You must create at least one storage unit on each Data Domain system that you will use with the Microsoft application agent. You can share a storage unit on a Data Domain system with more than one client system.

Procedure

1. Run the following command on the Data Domain system:

ddboost storage-unit create

2. Repeat step 1 for each Data Domain system that is enabled with DD Boost.

3. To list the status of the storage units, run the following command:

ddboost storage-unit show

Deleting storage units

About this task

To delete a specified storage unit and its contents, and any DD Boost associations, run the following command:

# ddboost storage-unit delete

The ddboost destroy command deletes all storage units from the Data Domain system and permanently removes all the data files contained in the storage units.

The Data Domain Operating System Command Reference Guide provides information about the ddboost commands.

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 23

(Optional) Configuring quotas for storage units Provision the storage on a Data Domain system through optional quota limits for a storage unit.

About this task

You can specify quota limits at either the storage unit level or the MTree level either when you create a storage unit or later. The Data Domain Operating System Command Reference Guide provides details about the quota and ddboost commands.

l To enable quota limits on the Data Domain system, run the following command:

quota capacity enable

l To verify the quota status, run the following command:

quota capacity status

l To configure quota limits when you create a storage unit, run the following command:

ddboost storage-unit create storage_unit_name [quota-soft-limit n {MiB| GiB|TiB|PiB}] [quota-hard-limit n {MiB|GiB|TiB|PiB}]

l To configure quota limits after you create a storage unit, run the following command:

quota capacity set storage-units storage_unit_list {soft-limit n {MiB|GiB| TiB|PiB}} {hard-limit n {MiB|GiB|TiB|PiB}}

For example:

quota capacity set storage-units SU_AEHDB5 soft-limit 10 GiB hard-limit 20 GiB

SU_AEHDB5: Quota soft limit: 10240 MiB, hard limit: 20480 MiB

Alternately, you can set the quota limits at the MTree level. For example:

quota capacity set mtrees /data/col1/SU_AEHDB5 soft-limit 10 GiB hard- limit 20 GiB

/data/col1/SU_AEHDB5: Quota soft limit: 10240 MiB, hard limit: 20480 MiB l To verify the quota limits of a storage unit, run the following command:

quota capacity show storage-units storage_unit_list

Alternately, to verify the quota limits at the MTree level, run the following command:

quota capacity show mtrees mtree_path

Configuring distributed segment processing You must configure the distributed segment processing option on the Data Domain system. The option setting applies to all the database servers and all the software that uses DD Boost.

You can manage the distributed segment processing by using one of the following methods:

Configuring the Data Domain System

24 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l The ddboost command.

l Data Domain System Manager on the Data Management > DD Boost page. The Data Domain Operating System Administration Guide provides information.

To configure the distributed segment processing option, run the following command:

ddboost option set distributed-segment-processing {enabled | disabled} Enabling or disabling the distributed segment processing option does not require a restart of the Data Domain file system.

A host on which you have installed the Data Domain Operating System (DD OS) release 5.2 or later enables the distributed segment processing feature by default. If you upgrade a host from DD OS release 5.0.x or 5.1.x to DD OS release 5.2 or later, the distributed segment processing option remains in its previous state, that is, either enabled or disabled.

Configuring advanced load balancing and link failover The advanced load balancing feature balances the load of a data transfer and distributes the load in private network when the Data Domain system receives data from the DD Boost client.

About this task

The process provides greater throughput, especially for environments that use multiple 1 GbE connections. The following restrictions apply to the configuration of the advanced load balancing and link failover:

l You can add interfaces to groups only by using an IP address.

l You must use interfaces that have the same link speed in a group. You must not mix 1 GbE interfaces with 10 GbE interfaces in a group.

You can manage advanced load balancing and link failover by using one of the following methods:

l The ddboost ifgroup command.

l Data Domain System Manager on the Data Management > DD Boost page. The Data Domain Operating System Administration Guide provides information.

Create the interfaces by using the net command before you create the interface group.

To create an interface group on the Data Domain system by adding existing interfaces to the group and registering the Data Domain system with the Microsoft application agent, perform the following steps:

Procedure

1. Add the interfaces to the group by running the ddboost ifgroup command. For example:

ddboost ifgroup add interface 192.168.1.1

ddboost ifgroup add interface 192.168.1.2

ddboost ifgroup add interface 192.168.1.3

ddboost ifgroup add interface 192.168.1.4

You can create only one interface group and you cannot rename this group.

2. Select one interface on the Data Domain system to register with the Microsoft application agent.

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 25

3. Create a failover aggregated interface and register that interface with the Microsoft application agent.

The Data Domain Operating System Administration Guide describes how to create a virtual interface for link aggregation.

You can use an interface that is not part of the ifgroup to register with the Microsoft application agent. You must register the interface with a resolvable name by using either DNS or any other name-resolution mechanism.

4. Enable the interface group on the Data Domain system by running the following command:

ddboost ifgroup enable

5. Verify the configuration by running the following command:

ddboost ifgroup show config interfaces

6. Add or delete interfaces from the group.

Results

After setting up the interface group, you can add or delete interfaces from the group.

Configuring DD Boost over fibre channel DD OS release 5.3 and later support fibre channel (FC) communication between the Data Domain Boost library and the Data Domain system.

About this task

Note: This topic is relevant only if you use fibre channel for backup and restore operations with the Microsoft application agent.

To use some products, you require the use of fibre channel as the data transfer mechanism between the Data Domain Boost library and Data Domain system. The Data Domain Boost over fibre channel transport (DD Boost-over-FC) enables such products to access the DD Boost technology features.

Although fibre channel is specified as a general-purpose data transport mechanism, you can use fibre channel solely as a transport for SCSI device access. Fibre channel hardware and drivers reside solely within the SCSI protocol stacks in host operating systems. The DD Boost-over-FC transport must use SCSI commands for all communication.

To request access to a Data Domain system, the Microsoft application agent specifies the DD Boost-over-FC server name that is configured for the Data Domain system. The DD Boost-over- FC transport logic within the DD Boost library performs the following tasks:

l Examines the set of generic SCSI devices that are available on the database server.

l Uses SCSI commands to identify a catalog of devices, which are pathnames of the SCSI devices that the database server operating system discovers.

l Issues SCSI commands to the identified generic SCSI devices to transfer Data Domain Boost protocol requests and responses between the library and the Data Domain system.

The DD Boost-over-IP advanced load balancing and link failover feature and its associated ifgroups require the IP transport. You can achieve load balancing and link-level high availability for the DD Boost-over-FC transport through different means.

Configuring the Data Domain System

26 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

The DD Boost-over-FC communication path applies only between the database server or Data Domain Boost library and the Data Domain system. The DD Boost-over-FC communication path does not apply to communication between two Data Domain systems.

To enable the DD Boost-over-FC service, you must install the supported fibre channel target HBAs on the host. The Data Domain Operating System Command Reference Guide and Data Domain Operating System Administration Guide provide information about using the scsitarget command for managing the SCSI target subsystem.

Procedure

1. Enable the DD Boost-over-FC service by running the following command:

# ddboost option set fc enabled

2. (Optional) Set the dfc-server-name by running the following command:

# ddboost fc dfc-server-name set server_name

Alternatively, accept the default name, which is the base hostname of the Data Domain system. A valid dfc-server-name consists of one or more of the following characters:

l lowercase letters (az)

l uppercase letters (AZ)

l digits (09)

l underscore (_)

l dash () Note: The dot or period character (.) is not valid within a dfc-server-name. You cannot use the fully qualified domain name of a Data Domain system as the dfc- server-name.

3. Create a DD Boost FC group by running the following command:

# ddboost fc group create group_name

For example:

# ddboost fc group create lab_group

4. Configure the device set of the DD Boost FC group by running the following command:

# ddboost fc group modify group_name device-set count count endpoint {all | none | endpoint_list}

For example:

# ddboost fc group modify lab_group device-set count 8 endpoint all

5. Add initiators to the DD Boost FC group by running the following command:

# ddboost fc group add group_name initiator initiator_spec

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 27

For example:

# ddboost fc group add lab_group initiator "initiator-15,initiator-16"

6. Verify that the DFC devices are visible on the client.

7. Ensure that the user, who performs the backups and restores has the required permissions to access the DFC devices.

Managing the DD Boost-over-FC path The ifgroup-based advanced load balancing and link failover mechanism does not apply to the Fibre Channel transport.

The Data Domain system advertises one or more Processor-type SCSI devices to the database server over one or more physical paths. The database server operating system discovers the devices and makes them available to applications through a generic SCSI mechanism (SCSI Generic driver on Linux, SCSI Pass-Through Interface on Windows).

Consider the following example:

l The database server has two initiator HBA portsA and B

l Data Domain System has two FC target endpointsC and D

l You have configured Fibre Channel Fabric zoning so that both initiator HBA ports can access both FC target endpoints

l You have configured Data Domain system with a DD Boost FC group that contains the following components:

n Both FC target endpoints on the Data Domain system

n Both initiator HBA ports

n Four devices (0, 1, 2, and 3)

In this example, the media server operating system might discover up to 16 generic SCSI devices; one for each combination of initiator, target endpoint, and device number:

/dev/sg11: (A, C, 0) /dev/sg12: (A, C, 1) /dev/sg13: (A, C, 2) /dev/sg14: (A, C, 3) /dev/sg15: (A, D, 0) /dev/sg16: (A, D, 1) /dev/sg17: (A, D, 2) /dev/sg18: (A, D, 3) /dev/sg19: (B, C, 0) /dev/sg20: (B, C, 1) /dev/sg21: (B, C, 2) /dev/sg22: (B, C, 3) /dev/sg23: (B, D, 0) /dev/sg24: (B, D, 1) /dev/sg25: (B, D, 2) /dev/sg26: (B, D, 3)

When the Microsoft application agent requests that the Data Domain Boost library establish a connection to the server, the DD Boost-over-FC transport logic within the DD Boost library uses SCSI requests to build a catalog of these 16 generic SCSI devices. The SCSI devices are paths to access the DD Boost-over-FC service on the Data Domain System. As part of establishing the connection to the server, the DD Boost-over-FC transport logic provides the catalog of paths to the server.

Configuring the Data Domain System

28 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Selecting the initial path The server maintains statistics about the DD Boost-over-FC traffic over the various target endpoints and known initiators. During the connection setup procedure, path management logic in the server evaluates these statistics and then selects the path, through which the server establishes the connection, based on the following criteria:

l Evenly distribute the connections across different paths for queue-depth constrained clients. Queue-depth constraints on page 29 provides more information.

l Select the least busy target endpoint.

l Select the least busy initiator from among the paths to the selected target endpoint.

Dynamic rebalancing The server periodically performs dynamic rebalancing when the statistics reveal the following situations:

l For queue-depth constrained clients that Queue-depth constraints on page 29 describes, connections are distributed unequally across available paths

l Workload across target endpoints is out of balance

l Workload across initiators is out of balance

When the server finds one of these situations, the server marks one or more connections for server-directed path migration. In a future data transfer operation, the server requests that the DD Boost library use a different path from the catalog for subsequent operations.

Client path failover The server dynamic rebalancing logic directs the client to use a different path. However, the client can use a different path if the client receives errors while using the connection's current path.

For example, assume the path catalog for a connection consists of eight paths:

/dev/sg21: (A, C, 0) /dev/sg22: (A, C, 1) /dev/sg23: (A, D, 0) /dev/sg24: (A, D, 1) /dev/sg25: (B, C, 0) /dev/sg26: (B, C, 1) /dev/sg27: (B, D, 0) /dev/sg28: (B, D, 1)

The server selects the (A, C, 0) path during an initial path selection. The DFC transport logic in the DD Boost library starts sending and receiving data for the connection by using SCSI commands to /dev/sg21.

Later, the link from the target endpoint C to the switch becomes unavailable. Any subsequent SCSI request that the DFC transport logic submits to /dev/sg21 fails with an error code that indicates that the process could not deliver the SCSI request to the device.

In this case, the DFC transport logic looks in the catalog of devices for a path with a different physical component and a different combination of initiator and target endpoints. The DFC transport logic retires the SCSI request on the selected path, and repeats the process till the DFC transport logic finds a path that can successfully complete the SCSI request.

Queue-depth constraints The specific SCSI device that receives a request is irrelevant to the DD Boost-over-FC solution. All SCSI devices are identical destination objects for SCSI commands. When processing a SCSI

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 29

request, the server logic gives no consideration to the specific device on which the SCSI request arrived.

Certain client operating systems restrict the number of outstanding I/O requests that the operating system can simultaneously process over a SCSI device. For example, the Windows SCSI Pass-Through Interface mechanism conducts only one SCSI request at a time through each of its generic SCSI devices. When multiple connections (for example, backup jobs) try to use the same generic SCSI device, the performance of the DD Boost-over-FC solution is impacted.

The Data Domain system also imposes a limit on the number of outstanding I/O requests for each advertised SCSI device. You must advertise multiple SCSI devices on the Data Domain system to overcome performance issues in the case of heavy workloads. The term queue-depth describes the system-imposed limit on the number of simultaneous SCSI requests on a single device. Client systems, such as Windows, the queue depth of which is so low as to impact performance, are considered to be queue-depth constrained.

Enabling encrypted file replication To enable the encrypted file replication option, run the following command:

About this task

# ddboost file-replication option set encryption enabled

Enabling encrypted file replication requires additional resources, such as CPU and memory on the Data Domain system, and does not require a restart of the Data Domain file system. The Data Domain Operating System Administration Guide provides information about encrypted file replication.

Data Domain replication Replicate data to remote Data Domain systems by using Data Domain Replicator. Replicating data enables you to perform recoveries in the case of disasters.

The Data Domain Replicator provides automated encrypted replication for disaster recovery and multi-site backup and archive consolidation. The Data Domain Replicator software asynchronously replicates only compressed, deduplicated data over a wide area network (WAN).

The Microsoft application agent does not initiate or monitor a replication. However, the product can restore from the replicated copy on a secondary Data Domain system. You must have used the product to create the backup on a primary Data Domain system. A Data Domain administrator performs the backup replication from the primary system to the secondary system.

To restore from a secondary Data Domain system, the restore operation must point to the secondary Data Domain system in the Data Domain host setting. There are no secondary Data Domain parameters.

Point to the secondary Data Domain system when configuring the restore operation through the Microsoft SQL Server Management Studio plugin or the command prompt. When configuring a restore through the command prompt, point to the secondary Data Domain system either explicitly with a Data Domain host parameter or with a configuration file.

For Storage Direct, both the Data Domain Boost storage unit, which contains the catalog information and backup of the files that cannot be backed up through VSS such as SQL transaction log backups, and the Data Domain vdisk pool used by the Microsoft application agent must be replicated. Microsoft application agent supports only object-level and granular-level restores from Storage Direct copies on a secondary Data Domain system. The vdisk replica pool must be the exact same as the source vdisk pool.

Note: The replication process must not change the names of the directories and files created by the Microsoft application agent.

Configuring the Data Domain System

30 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

To enable the backup replication and subsequent restore from a secondary Data Domain system, the user ID or primary group ID of the DD Boost users on the primary and secondary systems must be identical.

You must meet specific configuration requirements to enable the restore of replicated backups from a secondary Data Domain system.

The Knowledgebase Article number 456734, titled Configuration of DDBoost Users on Source and Destination DDRs for MTree Replication, provides more details. The article is available on the Support website at https://support.emc.com.

The Configuring replication section in the Data Domain Operating System Administration Guide provides information about creating, enabling, disabling, and deleting replication pairs.

Configuring usage limits of Data Domain resources Use either the Data Domain operating system commands or the Data Domain Administration GUI to set limits on usage of the following Data Domain resources:

l Capacity: The amount of hard drive capacity that the application agent uses on a Data Domain host. Capacity limits are based on the used logical space, which depends on the amount of data that is written to a storage unit before deduplication. Logical capacity is the size of the uncompressed data. For example, when a 1 GB file is written twice to the same empty storage unit, the storage unit has a logical size of 2 GB, but a physical size of 1 GB.

l Streams: The number of Data Domain Boost streams that the application agent uses to read data from a storage unit or write data to a storage unit on a Data Domain host.

NOTICE The Microsoft application agent supports usage limits on Data Domain resources for Application Direct operations only.

Data Domain uses the term quota to collectively describe the capacity soft and hard limits of a storage unit. Stream limits are called limits.

The Data Domain operating system supports soft and hard limits on capacity and streams usage:

l When the Microsoft application agent exceeds a soft limit, the Data Domain host generates an alert. If the administrator has configured a tenant-unit notification list, the Data Domain host sends an email to each address in the list. The Microsoft application agent can continue to use more of the limited resource after a soft limit is exceeded.

l When the Microsoft application agent exceeds a hard limit, it cannot use any more of the limited resource.

The Data Domain administrator must create a separate storage unit for each application agent host or set of hosts that are limited.

For example, if there are 10 application agent hosts, the Data Domain administrator must create at least 10 storage units to limit the storage unit capacity that each application agent host uses. To use fewer storage units, the administrator must group the application agent hosts and assign the group to a single storage unit. The application agent hosts in the group share this storage unit. However, you cannot limit the consumption of a storage unit by each host. One application agent host can consume 100% of the storage unit. The resources are consumed on the first-come, first- serve basis.

To determine the stream limits of a storage unit, run the following command:

msagentadmin.exe administration --listSU --config [--debug 9]

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 31

Example output of the command:

active write streams: 11 active read streams: 0 soft limit write streams: none soft limit read streams: none soft limit combined streams: 40 hard limit combined streams: 60

NOTICE Depending on the number and type of parallel operations that are performed at a given time, the stream usage varies. To determine the exact usage of the streams, monitor the number of streams that the storage units use over a period of time.

Impact of exceeding quota limits At the start of a backup, the Microsoft application agent cannot determine how much capacity is required for the backup. The Microsoft application agent can perform a requested backup only when the destination host has sufficient space or storage capacity.

Exceeding the soft quota limit

When the Microsoft application agent exceeds the capacity soft limit:

l During a backup, if the storage unit is part of a tenant-unit with a notification list, the Data Domain host sends an email to each address in the list. The list can include the Data Domain administrator and the application agent user.

l Alerts appear in the Current Alerts panel in the Data Domain Administration GUI regardless of whether the storage unit is part of a tenant-unit.

l The backup or restore operation continues without any adverse impact. The application agent does not generate any warning or error message in its log file or operational output.

Exceeding the hard quota limit

When the Microsoft application agent exceeds the capacity hard limit during a backup, the Microsoft application agent cancels the backup.

Check the client backup and restore logs for error messages related to insufficient space on the storage unit. The following message shows an example:

145732:(pid 4584):Max DD Stream Count: 60 153003:(pid 4584): Unable to write to a file due to a lack of space. The error message is: [5005] [ 4584] [984] Thu Apr 14 10:14:18 2016 ddp_write() failed Offset 163577856, BytesToWrite 524288, BytesWritten 0 Err: 5005-ddcl_pwrite failed (nfs: No space left on device) 86699:(pid 4584): Unable to write data into multiple buffers for save-set ID '1460654052': Invalid argument (errno=22)

Configuring usage limits of Data Domain quota To configure capacity usage limits for the application agent, the Data Domain administrator must set the hard capacity limit for the storage unit that the application agent uses for backups:

Procedure

1. Determine which application agent hosts use the storage unit.

2. Determine the amount of capacity to allow for the storage unit.

3. Create the storage unit, and then set the capacity quota by using either the GUI or the command prompt. The Data Domain documentation provides information.

4. Provide the Data Domain hostname, storage unit name, username, and password of the storage unit to the application agent users to use to perform backups.

Configuring the Data Domain System

32 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

The Data Domain administrator can also set the soft capacity quota for the storage unit, which sends alerts and notifications, but does not limit the capacity usage.

Note: When a storage unit is almost full and the capacity quota is decreased, the next backup can fail. Data Domain administrators must notify the Microsoft application agent users when they decrease a capacity quota, so that the application agent users can evaluate the potential impact on backups.

Impact of exceeding the soft stream limit When the Microsoft application agent exceeds the stream soft stream limit:

l During a backup, if the storage unit is part of a tenant-unit with a notification list, the Data Domain host sends an email to each address in the list. The list can include the Data Domain administrator and the application agent user.

l Alerts appear in the Current Alerts panel in the Data Domain Administration GUI regardless of whether the storage unit is part of a tenant-unit.

l The backup or restore operation continues without any adverse impact. The application agent does not generate any warning or error message in its log file or operational output.

Impact of exceeding the hard stream limit When the Microsoft application agent exceeds the hard stream limit during an operation, the Microsoft application agent cancels the operation.

Check the client backup and restore logs for error messages related to an exceeded stream limit. The following message shows an example:

153004:(pid 4144): Unable to write to a file because the streams limit was exceeded.

Configuring usage limits of Data Domain streams A storage unit can have soft and hard limits for streams. The Data Domain administrator can set individual soft limits for read, write, and replication streams. The administrator can set a hard limit only for the total number of streams.

About this task

To configure a streams usage limit for a storage unit, the Data Domain administrator must set the hard limit for the storage unit that the application agent uses for backups:

Procedure

1. Determine which application agent hosts use the storage unit.

2. Determine the number of backup streams to allow for the storage unit.

3. Create the storage unit.

The Data Domain administrator can set the streams limit either as part of the ddboost storage-unit create command or after creating the storage unit by using the ddboost storage-unit modify command. The Data Domain documentation provides information.

Note: The Data Domain administrator cannot set a streams limit by using the Data Domain Administration GUI.

4. Provide the Data Domain hostname, storage unit name, username, and password of the storage unit to the application agent users to use to perform backups.

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 33

The Data Domain administrator can also set soft limits for the storage unit, which send alerts and notifications, but do not limit the number of streams used.

The Data Domain administrator can use the ddboost storage-unit modify command to modify the streams limits of storage units. The Data Domain documentation provides information.

Note: The Data Domain administrator must use caution when setting a streams hard limit. Setting the streams limit to a low value can impact the backup and restore performance. Decreasing a streams limit can result in a restore failure. The Data Domain administrator must notify the application agent users when decreasing a streams hard limit so that the application agent users can evaluate the potential impact on backups and restores.

Configuring the Data Domain Cloud Tier for data movement to the cloud

You can configure the Microsoft application agent to use the Data Domain Cloud Tier for the movement of backup data to the cloud and the subsequent recall of the backup data from the cloud.

Data Domain (DD) Cloud Tier is a native feature of DD OS 6.0 and later for data movement from the active tier to low-cost, high-capacity object storage in the public, private, or hybrid cloud for long-term retention.

The Microsoft application agent supports the DD Cloud Tier for movement of Application Direct backup data to the cloud, which frees up space on the Data Domain system (active tier).

Note: The Microsoft application agent does not support the DD Cloud Tier for movement of Storage Direct backup data to the cloud.

PowerProtect X400 systems do not support DD Cloud Tier.

When the Application Direct host is integrated with the PowerProtect Data Manager server, the cloud tier for backup copies must be managed from PowerProtect Data Manager only. For the self-service restore of such copies, recall the copies to the active tier from PowerProtect Data Manager and then perform the self-service restore from the application host.

You must set up a DD Cloud Tier policy, also known as a data movement policy, for each MTree or storage unit that the Microsoft applicant agent uses for data movement to the cloud.

After you have set up the data movement policies, you can configure and perform the following operations:

l Movement of backup data from the Data Domain system to the cloud.

l Recall of backup data from the cloud to the Data Domain system.

A backup with the Microsoft application agent consists of backup save sets, where a save set is a collection of one or more save files created during the backup session.

A save file is an operating system file or block of data, the simplest object that you can back up or restore. A backup creates one or more save files within a save set. The Microsoft application agent moves and recalls the backup data at the save set level only, moving all the save files in a save set.

Configuring the Data Domain System

34 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Setting up the DD Cloud Tier policy for data movement to the cloud The Microsoft application agent moves the backup data from the active tier to the cloud according to the DD Cloud Tier policy. To enable the data movement to the cloud, you must set up the required policy for each MTree or storage unit.

DD Cloud Tier provides two types of policy, the application-based policy and the age-based policy. The Microsoft application agent supports only the application-based policy, which is managed by the application that creates the backup files on the Data Domain system. This policy moves the backup file content to the cloud according to the application's specifications.

NOTICE Do not apply an age-based policy to a storage unit that is used by the Microsoft application agent. An age-based policy moves all the file content (including metadata) from a storage unit to the cloud according to the file age, as when all the files older than T days are moved. Such data movement by an age-based policy can cause the failure of metadata queries for the Microsoft application agent.

The DBA must contact the Data Domain administrator to create the application-based policy, also known as a data movement profile, for the MTree or storage unit that the Microsoft application agent uses for the Application Direct backups. The Data Domain documentation provides details about the DD Cloud Tier configuration procedures.

For any DD OS version earlier than 6.1, the Data Domain administrator must use DD REST APIs to create application-managed based policies through tools such as the curl command. Starting with DD OS 6.1, the Data Domain administrator can run the Data Domain command data- movement policy to configure the application-based policy

Using the data-movement command with DD OS 6.1 or later

DD OS 6.1 or later enables you to configure the application-based policy through the following Data Domain command from the command line. This command sets the application-based policy for the specified Mtrees:

data-movement policy set app-managed {enabled | disabled} to-tier cloud cloud- unit mtrees

For example, the following command sets the application-based policy for the Mtree /data/ col1/app-agent40:

data-movement policy set app-managed enabled to-tier cloud cloud-unit Cloud mtrees /data/col1/app-agent40

You can run the following command to display the policy configuration result for verification purposes:

data-movement policy show

Mtree Target(Tier/Unit Name) Policy Value ------------------------- ---------------------- ------------- ------- /data/col1/app-agent40 Cloud/Cloud app-managed enabled ------------------------- ---------------------- ------------- -------

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 35

Distributed segment processing Distributed segment processing uses the Data Domain Boost library on the database server and the Data Domain software on Data Domain Replicator. The Microsoft application agent loads the DD Boost library during backup and restore operations.

Distributed segment processing allows the Microsoft application agent to perform parts of the deduplication process, which avoids sending duplicate data to the Data Domain system that you configured as a storage server.

The distributed segment processing feature provides the following benefits:

l Increases throughput because the DD Boost library sends only unique data to the Data Domain system. The throughput improvements depend on the redundant nature of the data that you back up, the overall workload on the database server, and the database server capability. In general, greater throughput is attained with higher redundancy, greater database server workload, and greater database server capability.

l Decreases network bandwidth requirements by sending the unique data to the Data Domain system through the network.

Manage distributed segment processing by using the ddboost command options. Use distributed segment processing if the network connection is 1 Gb Ethernet. Configuring distributed segment processing on page 24 provides information on how to configure the distributed segment processing.

Distributed segment processing supports the following modes of operation for sending backup data to a Data Domain system:

l Distributed segment processing enabled

l Distributed segment processing disabled

Set the operation mode on the Data Domain system. The Microsoft application agent negotiates with the Data Domain system for the current setting of the option and accordingly performs backups.

Distributed segment processing enabled mode When you enable the distributed segment processing feature, the DD Boost library performs the following tasks:

1. Segments the data.

2. Computes IDs for the data segments.

3. Checks with the Data Domain system for duplicate segments.

4. Compresses unique segments that the Data Domain system does not contain.

5. Sends the compressed data to the Data Domain system, which writes the unique data to disk.

You must configure the local compression algorithm that the DD Boost library uses on the Data Domain system. The Data Domain Operating System Administration Guide provides more information about local compression and its configuration.

Configuring the Data Domain System

36 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Distributed segment processing disabled mode When you disable the distributed segment processing feature, the DD Boost library sends the data directly to the Data Domain system through the network. The Data Domain system then segments, deduplicates, and compresses the data before writing it to the disk.

Note: You cannot disable the distributed segment processing feature on an Extended Retention Data Domain system.

Advanced load balancing and link failover Note: This topic is relevant only if you use an Ethernet connection for backup and restore operations with the Microsoft application agent.

The advanced load balancing and link failover feature enables the following capabilities:

l Combination of multiple Ethernet links into an interface group.

l Registration of only one interface on the Data Domain system with the Microsoft application agent.

If you configure an interface group, the Microsoft application agent negotiates with the Data Domain system on the registered interface to send the data. When the Data Domain system receives the data, the data transfer load is balanced and distributed on all the interfaces in the group.

Load balancing provides greater physical throughput to the Data Domain system as compared to configuring the interfaces into a virtual interface by using Ethernet-level aggregation.

The Data Domain system balances the connection load from multiple database servers on all the interfaces in the group. The advanced load balancing and link failover feature works at the Application Direct software layer. The feature is seamless to the underlying network connectivity, and supports both physical and virtual interfaces.

The feature balances the load of the data transfer depending on the number of outstanding connections on the interfaces. The feature balances the load of the connections only for backup and restore jobs.

The file replication connection between Data Domain systems is not part of the load balancing. You must use only one IP address for the target Data Domain system.

You must exclude one interface from the interface group (ifgroup) and reserve that interface for the file replication path between the source and target Data Domain systems.

Every installation of the Microsoft application agent must be able to connect to every interface that is a member of the interface group on the Data Domain system.

You can use the advanced load balancing and link failover feature with other network layer aggregation and failover technologies. You can put the links that connect the database servers and the switch that connects to the Data Domain system in an aggregated failover mode. This configuration provides end-to-end network failover functionality. You can use any of the available aggregation technologies between the database server and the switch.

The advanced load balancing and link failover feature also works with other network layer functionality, such as VLAN tagging and IP aliasing, on the Data Domain systems. This functionality provides additional flexibility in segregating traffic into multiple virtual networks that run through the same physical links on the Data Domain system.

The Data Domain Operating System Administration Guide provides more information about how to configure VLAN tagging and IP aliasing on a Data Domain system.

The advanced load balancing and link failover feature provides the following benefits:

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 37

l Eliminates the need to register one storage server for each host that runs the Microsoft application agent, which potentially simplifies installation management.

l Routes subsequent incoming backup jobs to the available interfaces if one of the interfaces in the group stops responding while the Data Domain system is operational.

l Increases link utilization by balancing the load of the backup and restore jobs on multiple interfaces in the group.

l Performs a transparent failover of all current jobs to healthy operational links when an interface fails. The process does not interrupt the jobs.

Configuring advanced load balancing and link failover on page 25 provides information about how to configure advanced load balancing and link failover.

Configuration restrictions The Advanced load balancing and link failover feature has the following restrictions:

l You can add interfaces to groups only by using IP addresses.

l You must use interfaces that have the same link speed in a group.

l You need a switch to connect multiple database servers because a Data Domain system supports only one interface group.

Encrypted managed file replication By default, after the database servers authenticate the file replication jobs by using the preconfigured Application Direct username and password, they set up unencrypted file replication jobs between two Data Domain systems. If you enable the encrypted file replication feature, when the database servers set up a replication job, the session between the source and destination Data Domain systems uses Secure Sockets Layer (SSL) to encrypt all image data and metadata sent over the WAN.

Enabling this feature on the Data Domain system is transparent to the Microsoft application agent. When the Microsoft application agent requests that the Data Domain system perform a file replication job, the source and destination systems negotiate the encryption without involving the Microsoft application agent. Encrypted file replication uses the ADH-AES256-SHA cipher suite, which you cannot change, on the Data Domain operating system. If you enable this feature, you do not require to restart the file system on the Data Domain system.

If you enable encrypted file replication, you must install a replicator license on any source and destination Data Domain systems that have DD OS 5.0 or later. Encrypted file replication applies to all file replication jobs on the system.

You can use encrypted file replication with the encryption of data-at-rest feature, which is available on Data Domain operating systems with the optional encryption license. When you use encrypted file replication with the encryption of data-at-rest feature, the backup process uses SSL to encrypt the backup image data over a WAN.

Enabling encrypted file replication on page 30 provides information on how to enable encrypted file replication. The Data Domain Operating System Administration Guide provides more information about encrypted file replication.

Data Domain High Availability The Data Domain High Availability feature enables you to configure two Data Domain systems as an Active-Standby pair, which provides redundancy in the case of a system failure. The feature

Configuring the Data Domain System

38 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

ensures that the active and standby systems are in sync so that if the active node fails because of either hardware or software issues, the standby node can continue the services.

The Data Domain High Availability feature provides the following additional support and capabilities:

l Supports failover of backup, restore, replication, and management services in the two-node system. Automatic failover does not require the user intervention.

l Provides a fully-redundant design with no failures when the system is configured according to the recommendations.

l Provides an Active-Standby system with no deterioration of performance in the case of a failover.

l Provides a failover within 10 minutes for most of the operations.

l Supports IP and FC connections. Both the nodes must have access to the same IP networks, FC SANs, and hosts.

The latest version of the Data Domain Operating System Administration Guide provides more information about the Data Domain High Availability feature.

Validating the Data Domain system To validate the status of the Data Domain system, run the following commands:

filesys status ddboost status ifgroup show config interfaces ddboost show connections ddboost storage-unit show compression ddboost storage-unit show

The Data Domain Operating System Command Reference Guide provides details about these commands and their options.

The command that you use to validate the communication between the database server and the Data Domain system depends on the type of the network connection that you use.

l If you have a DD Boost-over-IP system, log in to the database server, and then run the following command:

# rpcinfo -p

The command output must include the ports listed in Opening ports in a firewall to enable Data Domain backups on page 20.

l If you have a DD Boost-over-FC system, log in to the database server, and then run the relevant command to verify whether the DFC devices are visible on the client. The Data Domain Operating System Command Reference Guide provides details about the supported commands.

Troubleshooting the Data Domain system The Knowledgebase Article 334991, which is titled How to troubleshoot DataDomain DD Boost connectivity and performance provides information about how to use the ddpconnchk tool to

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 39

troubleshoot specific Application Direct issues. The article is available on Online Support (https:// support.emc.com).

Configuring the Data Domain System

40 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 2

Configuring Application Direct

This chapter includes the following sections:

l Overview of Application Direct with SQL Server................................................................... 42 l Architecture of the Microsoft application agent for Application Direct with SQL Server.......43 l SQL Server transparent data encryption............................................................................... 44 l Configure a user with the required privileges for SQL Server Application Direct operations..45 l Create a configuration file..................................................................................................... 47 l Configuring the lockbox........................................................................................................ 49 l Configure prerequisites to back up and restore Always On availability groups.......................52 l Parsing TSQL operational output into multiple tables............................................................54

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 41

Overview of Application Direct with SQL Server Learn about the features and capabilities that the Microsoft application agent for Application Direct with SQL Server supports.

Backup and recovery

l Federated backups and restores of Always On availability group databases.

l Instance-level backups and restores.

l Multiple database backups and restores.

l Scheduled backups with SQL Agent Jobs.

l Transact-SQL (T-SQL) scripting with improved return codes to perform backups and restores in a SQL environment.

l Table restores, which are also known as granular-level restores, with ItemPoint for SQL Server.

l Flat file restores.

l Restores at file group level.

l Redirected restore to the same or a different SQL Server, same or a different SQL instance, and same or a different database.

Data Domain Cloud Tier

l Marking save sets to move from a Data Domain active tier to a Data Domain Cloud Tier.

l Manually recalling save sets from a Data Domain Cloud Tier to a Data Domain storage unit.

l Automatically recalling save sets from a Data Domain Cloud Tier to a Data Domain storage unit or restoring backups directly from the cloud.

Note: Direct restore operations are only available for DDOS 6.1 using Elastic Cloud Storage

l Deleting save sets on a Data Domain Cloud Tier.

Environmental support

l IPv4 and IPv6 support.

l Coexistence with other backup products that protect data that the Microsoft application agent does not protect. However, the Microsoft application agent cannot coexist with the database application agent.

l Common lockbox path, that is, the same lockbox in a common location for the Microsoft application agent, the database application agent, and the Storage Direct agent.

l Supports Data Domain High Availability for improved resiliency. Data Domain High Availability on page 38 provides information.

User interface

l Displaying the Windows cluster name and the backup preference in the Connections panel in the GUI, in the case of Always On availability groups.

l Displaying a message in the Database Restore GUI to enable the instant file initialization feature on SQL Server for a better performance of database restores, if the feature is not enabled.

l Caching data related to SQL Server, SQL Server instances, databases, and other settings on the General, Files, and Options pages whenever the application agent starts. The application agent also caches the save set information for the duration of a particular session. Caching saves time by eliminating the need to reselect the settings each time the

Configuring Application Direct

42 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

application agent starts, and especially when the SQL Server contains a large number of databases, or a large number of backups for a database.

l Retrieving a particular number of save sets or backup versions, and displaying them depending on the value (number) that is specified in the Database Restore GUI.

Architecture of the Microsoft application agent for Application Direct with SQL Server

The following figure illustrates the general architecture of the Microsoft application agent for Application Direct with SQL Server.

Figure 1 The Microsoft application agent for Application Direct with SQL Server general architecture

The following points describe the important components of the Microsoft application agent for Application Direct with SQL Server:

l SQL Server Management Studio plug-in: The Microsoft application agent for Application Direct with SQL Server has an SSMS plug-in GUI. The plug-in is similar to the SQL native backup and restore GUI.

l Virtual Device Interface: The Microsoft application agent for Application Direct with SQL Server uses a VDI, which is an API provided by SQL Server, to integrate with the SQL Server and enables the Application Direct with Microsoft application agent to back up and restore SQL Server data. The Microsoft documentation provides information about the VDI technology. Run the Microsoft application agent on the same host that has the SQL Server.

l DD Boost library: Performs source-based deduplication and sends the backup data to the Data Domain or PowerProtect X400 server.

SQL-CLR Assembly: CLR and T-SQL scripts must be integrated to create functions or procedures to perform backups and restores in a SQL environment. The Microsoft application agent installation deploys the CLR assembly. The CLR assembly contains one exportable SQL function type routine to run any Microsoft application agent command at the command prompt.

The following figure illustrates the SQL Server - CLR Assembly architecture.

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 43

Figure 2 The Microsoft application agent for Application Direct with SQL Server - CLR Assembly architecture

SQL Server transparent data encryption Microsoft SQL transparent data encryption (TDE) is a feature that performs realtime I/O encryption and decryption of the data and log files.

TDE uses a database encryption key (DEK), which is stored in the database boot record for availability during recovery. Encryption of the database file is performed at the page level. The pages in an encrypted database are encrypted before they are written to disk and decrypted when read into memory. When using this feature, ensure that the certificate and private key are backed up with the encrypted data.

Microsoft SQL Server 2008 and later introduce the TDE database-level encryption feature. This feature provides protection for the entire database at rest, without affecting existing applications. The Microsoft application agent supports SQL data encryption at the cell level, at the full database level by using TDE, or at the file-level with encryption options provided by Microsoft.

Note: The Microsoft application agent does not support third party transparent data encryption for SQL VDI.

The Microsoft SQL Server product documentation provides more information about TDE, enabling data encryption, and protecting the encryption keys.

Note: When enabling TDE, back up the certificate and the private key associated with the certificate. If the certificate becomes unavailable or if the database is restored on another server, backups of both the certificate and the private key must be available to open the database.

Configuring Application Direct

44 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configure a user with the required privileges for SQL Server Application Direct operations

The Microsoft application agent requires that the user starting backup and recovery operations is assigned certain privileges from the SQL Server and the Windows application host. The minimum Windows privileges that are required depend on the type of operation and tool that you use.

Microsoft documentation provides additional information and steps on how to configure user accounts.

Required privileges for backup and recovery of a stand-alone server Learn about the user requirements for stand-alone backup and recovery.

Required SQL Server roles

Assign the user the following SQL Server roles:

l sysadmin

l public

Required Windows user permissions

Create a local or domain Windows user account and assign the following roles:

l For table-level backup and recovery, assign administrative privileges.

l For database-level backup and recovery, assign the following permissions:

n Add the user to the "Create global objects" Windows policy

n Assign the following permissions to the data and log folder of the database:

Read

Write

List folder contents

The default data and log folder is the SQL Server installation path. For example, for SQL Server 2012 the default path is C:\Program Files\Microsoft SQL Server \MSSQL12.MSSQLSERVER\MSSQL\

Required privileges for backup and recovery of an Always On availability group Learn about the user requirements for stand-alone backup and recovery.

Required SQL Server roles

Assign the user the following SQL Server roles:

l sysadmin

l public

Required Windows user permissions

Create a Windows user account with one of the following configurations:

l The built-in Windows Administrator

l A domain user added to the Administrators user group

l A local user account added to the Administrators user group on each node in the cluster. The username and password must be the same on each node.

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 45

Note: If you are using an account that you created (an account that is not the built-in Windows Administrator), you must launch the tool where you will perform the backup or recovery with elevated permissions (run as administrator).

Required privileges to perform backup and recovery of a Failover Cluster Instance or Always On Failover Cluster Instance

Learn about the user requirements for Failover Cluster Instance or Always On Failover Cluster Instance backup and recovery.

Required SQL Server roles

Assign the user the following SQL Server roles:

l sysadmin

l public

Required Windows user permissions

Create a Windows user account with one of the following configurations:

l The built-in Windows Administrator

l A domain user added to the Administrators user group

Note: If you are using an account that you created (an account that is not the built-in Windows Administrator), you must launch the tool where you will perform the backup or recovery with elevated permissions (run as administrator).

Required privileges to view and delete save sets with the Application Direct expiry tool (ddbmexptool)

Any user can use the ddbmexptool command to list and delete save sets as long as the user is granted access to the lockbox using the msagentadmin command. Administrative privileges are not required.

Required user privileges to manage save sets and list client and storage unit information with msagentadmin.exe

Any user can use the msagentadmin.exe command to list files, mark and recall save sets, delete save sets, list clients on the storage units, and display Data Domain storage unit stream limit information. Administrative privileges are not required.

Note: When you use msagentadmin.exe to create and edit the lockbox, you must use an administrative user.

Adding a user to a Windows policy Procedure

1. From the Start menu, open Local Security Policy.

2. In the Security Settings pane, expand Local Policies > User Rights Assignment.

3. For each policy that you want to add the user to, complete the following steps:

a. Right-click the policy and click Properties.

b. In the policy Properties window, click Add User or Group.

Configuring Application Direct

46 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

c. Add the local user to the policy, and then click Apply.

Create a configuration file Create a configuration file with any of the following parameters, as required.

General

The following table describes the parameters for the General configuration file category.

Table 3 General configuration file parameters

Parameter Description

CLIENT= Mandatory.

Specifies the application server hostname, to which you want to back up or restore the databases. In the case of cluster configurations, specify the name of the cluster instance.

LOCKBOX_PATH= Optional.

Specifies the complete directory pathname of the lockbox on the database or application host. For example, C:\Program Files\DPSAPPS\common \lockbox.

DEBUG_LEVEL= Optional.

Specifies whether the software writes debug messages to the debug log file. The default value is 0, in which no debug messages are generated. The highest level is 9, in which the most detailed debug messages are generated.

LIST_SAVESET_DESC={TRUE | FALSE} Optional.

Specifies whether to list save sets in descending order, showing the most recent save sets first. The default value is FALSE, in which save sets are listed in ascending order.

Primary system

The following table describes the parameters for the Primary system configuration file category.

Table 4 Primary system configuration file parameters

Parameter Description

DDBOOST_USER= Mandatory.

Specifies the username of the DD Boost user.

You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 47

Table 4 Primary system configuration file parameters (continued)

Parameter Description

DEVICE_HOST= Mandatory.

Specifies the name of the Data Domain or PowerProtect X400 server that contains the storage unit, to which you want to back up and restore the databases.

You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

DEVICE_PATH= Mandatory.

Specifies the name and the path of the storage unit, to which you want to back up and restore the databases.

DDBOOST_FC={TRUE | FALSE} Optional.

Specifies whether a backup or restore on the primary Data Domain system uses a Fibre Channel (FC) or IP network connection. The default value is FALSE. Specify TRUE to use an FC network connection during backup and restore.

Note: If this parameter is set to TRUE, the primary Data Domain system must be configured to support an FC connection.

DEVICE_FC_SERVICE= Mandatory when the DDBOOST_FC parameter is set to TRUE

Specifies the name of the FC service configured on the primary Data Domain system to be used for a backup or restore.

DDVDISK_USER= Optional.

Specifies the Data Domain vdisk user. If you do not specify this parameter, the value defaults to the DDBOOST_USER.

Example 1 Example configuration file contents

For example, create the C:\ddconfig.cfg file with the following contents:

DDBOOST_USER=DD163_user DEVICE_HOST=ledmd035.lss.example.com DEVICE_PATH=/SU_DD163 LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox" CLIENT=mw2k8x64sql2.appagentdev.com DEBUG_LEVEL=0

Configuring Application Direct

48 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configuring the lockbox The lockbox is an encrypted file that the Microsoft application agent uses to store confidential data, such as login credentials, and protect that data from unauthorized access.

Registering a Data Domain or PowerProtect X400 server to a new lockbox creates the PersistedSettings.xml file in the lockbox folder. Registering a server to or removing a server from the lockbox updates the PersistedSettings.xml file.

The PersistedSettings.xml file contains the Data Domain or PowerProtect X400 server information, such as the server name, communication protocol, FC service name, username of the DD Boost user, and storage unit.

Note: For a PowerProtect X400 system, the PowerProtect Data Manager creates a storage unit and automatically configures the lockbox on the application host. For each PowerProtect protection policy, a source lockbox and replication target lockbox are created and configured on the application host.

For a Data Domain system, you can configure one of the following lockbox types according to the environmental requirements.

Single lockbox

In a stand-alone environment, create a single lockbox on the host.

Shared lockbox

In an environment with multiple instances, you can configure a single lockbox in a shared location and grant each remote host individual access to the lockbox.

Note: Do not use a single shared lockbox to perform remote backup operations in a cluster environment. The backup will fail. Use multiple lockboxes in a cluster environment.

Multiple lockboxes

In an environment with multiple instances, you can configure a lockbox on each instance in the environment.

Commands to create and manage the lockbox Lockbox operations are administered using the msagentadmin administration command.

Note: The user running the lockbox operations must be an administrator.

When the PowerProtect Data Manager centrally manages the SQL host, the PowerProtect Data Manager automatically performs the lockbox configuration when the PowerProtect protection policy is created and configured.

The following sections describe the commands for creating, registering, and managing the lockbox.

Create a lockbox

To create a lockbox, run the following command:

msagentadmin administration --createLB [--lockbox ] [-- debug 9]

If you don't specify a lockbox directory, the default directory is used, which is C:\Program Files\DPSAPPS\common\lockbox.

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 49

Register credentials to the lockbox

To register credentials to the lockbox, run the following command:

msagentadmin administration --registerLB --config [-- confirm] [--debug 9]

Unregister credentials from the lockbox

To delete credentials from the configuration file and lockbox, run the following command:

msagentadmin administration --deleteLB --config [-- confirm] [--debug 9]

Grant a remote host access to the lockbox

To grant a remote host access to the lockbox, run the following command

msagentadmin administration --grantLB [--lockbox ] [-a "LOCKBOX_REMOTE_HOST= "] [-a "VIRTUAL_HOST=yes"] [--debug 9]

Revoke access that a remote host has to the lockbox

To revoke access that a remote host has to the lockbox, run the following command

msagentadmin administration --revokeLB [--lockbox ] [-a "LOCKBOX_REMOTE_HOST= "] [--debug 9]

Reset the lockbox

To reset the lockbox, run the following command:

msagentadmin administration --updateLB [--lockbox ] [-- debug 9]

Create a custom passphrase

To create a custom passphrase for the lockbox, run the following command:

msagentadmin administration --updateLB -a SET_LOCKBOX_PASSPHRASE=TRUE -a LOCKBOX_PATH=

After typing this command, the following prompts appear. Use the prompts to set the passphrase.

Enter a passphrase (refer to the administration guide for passphrase complexity requirements): Confirm the passphrase:

The following output appears:

The passphrase for the lockbox ' ' in the directory ' ' has been updated.

Note: The custom passphrase must meet the following complexity requirements:

l Minimum length of nine characters.

Configuring Application Direct

50 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l Minimum of one uppercase character.

l Minimum of one lowercase character.

l Minimum of one special character.

l Minimum of one digit.

Use the custom passphrase to reset the lockbox

The passphrase may be used to restore access to a host that cannot access the lockbox.

To use the custom passphrase to reset the lockbox, run the following command:

msagentadmin administration --updateLB -a USE_LOCKBOX_PASSPHRASE=TRUE -a LOCKBOX_PATH=

After typing this command, the following prompt appears. Use the prompt to set the passphrase.

Enter a previously set passphrase:

The following output appears:

The lockbox ' ' in the directory ' ' has been reset.

Create a custom security option for a lower system stable values (SSV) threshold

To create a custom security option for lower security in the system stable values (SSV) threshold for the lockbox, run the following command:

msagentadmin administration --updateLB -a SET_LOCKBOX_SECURITY="custom" -a LOCKBOX_PATH=

This command is useful when the lockbox becomes frequently inaccessible after regular system upgrades. However, it is recommended that you use the passphrase to reset the lockbox instead of customizing the security level.

Import the lockbox

To import the lockbox, run the following command:

msagentadmin administration --updateLB -a LOCKBOX_IMPORT=yes -a LOCKBOX_PATH=

This command is useful when the lockbox is created in a non-default directory and the lockbox needs to be upgraded (imported) to the latest version.

Create a lockbox Use the following steps to create a lockbox and add credentials to it.

Procedure

1. Create the lockbox using the following command:

msagentadmin administration --createLB

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 51

For example, to create a lockbox in the folder C:\Lockboxes type the following command:

msagentadmin administration --createLB --lockbox C:\Lockboxes

If you don't specify a folder, the lockbox is created in the default directory, which is C:\Program Files\DPSAPPS\common\lockbox.

NOTICE When the Microsoft application agent is integrated with PowerProtect, the lockbox must be located in the default directory.

2. Create a configuration file that contains the appropriate credentials.

For example, type the following command to edit config.cfg:

notepad c:\Lockboxes\config.cfg

Then add the appropriate configurations to the configuration file. For example, to register a Data Domain server, add the following credentials:

LOCKBOX_PATH=C:\Lockboxes DDBOOST_USER=ddvdisk DEVICE_HOST=ledmd034.lss.emc.com DEVICE_PATH=/ddbdatest/mattp/pp

3. Use the configuration file to register the credentials with the lockbox by typing the following command:

msagentadmin administration --registerLB --config " "

For example:

msagentadmin.exe administration --registerLB --config "C:\lockbox- config-details.cfg"

You are prompted for any required passwords for the configured user accounts.

Configure prerequisites to back up and restore Always On availability groups

Configure the following prerequisites to perform federated backups of Always On availability groups.

Note: In addition to the following prerequisites, ensure that you have assigned the required permissions as described in Configure a user with the required privileges for SQL Server Application Direct operations on page 45.

Install the Microsoft application agent on each node

You must install the Microsoft application agent on all the nodes that are in the Always On availability group.

Configuring Application Direct

52 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configure the lockbox

You must configure either a single shared lockbox or a separate lockbox on each node that is in the Always On availability group.

Set Readable Secondary settings

Set the Always On availability group Readable Secondary configuration option to either Yes or Read-intent only:

1. On the SQL Servers SSMS, in the Object Explorer, right-click the Always On availability group and select Properties. The Availability Group Properties dialog box appears.

2. In the Availability Replicas table, in the Readable Secondary column, select either Yes or Read-intent only for each of the primary and secondary replicas of the SQL Server instances. This setting allows the Microsoft application agent to gather information about the secondary replica (for example, database file location, which can be different from the other replicas).

Configure the Execute Methods and Remote Enable permissions with Windows Management Instrumentation (WMI)

Configure Windows Management Instrumentation (WMI) to assign the Execute Methods and Remote Enable permissions to the user account:

Note: If you are a domain administrator, you do not need to explicitly set these permissions because you have these permissions by default.

1. On the SQL Server, from the Start menu, click Run.

2. Type wmimgmt.msc, and then press Enter on the keyboard.

3. In the WMI Control pane, right-click WMI Control (Local), and select Properties.

4. In the WMI Control Properties dialog box:

a. Click the Security tab.

b. Expand the Root node, and select the cimv2 namespace.

c. Click Security to open security settings for WMI.

d. Click Advanced to open the advanced security settings for this WMI namespace.

e. Specify the user account.

f. Click Edit, and select only Execute Methods and Remote Enable.

g. In the Apply to drop down list, select This namespace and subnamespaces to ensure that these permissions apply to this namespace and all the namespaces under it.

h. Click OK to save the new permissions.

Assign Read and Read & Execute permissions to the user account

On the NTFS volumes, assign the Read and Read & Execute permissions to the user account:

1. In Windows Explorer, right-click the file or folder with which you want to work, and select Properties.

2. In the Properties dialog box, click the Security tab.

3. From the Name list, select the user, contact, computer, or group whose permissions you want to view.

4. Assign the Read and Read & Execute permissions to the user account.

Assign Group Policy Object (GPO) rights to the user account

On the SQL Server, assign the Group Policy Object (GPO) rights to the user account:

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 53

l Assign the Log on as a batch job right to the user account to run tasks in the Task Scheduler when you are not logged in:

1. On the Start menu, click Run, type secpol.msc, and press Enter on the keyboard. The Local Security Policy window appears.

2. In the left pane, under Security Settings, click Local Policies > User Rights Assignment.

3. In the right pane, double-click Log on as a batch job. The Log on as a batch job Properties dialog box appears.

4. On the Local Security Setting tab, click Add User or Group.... The Select Users, Computers, Service Accounts, or Groups dialog box appears.

5. In the Enter the object names to select field, specify the user account, and then click OK.

l Assign the Log on as a service right to the user account:

1. On the Start menu, click Run, type secpol.msc, and press Enter on the keyboard. The Local Security Policy window appears.

2. In the left pane, under Security Settings, click Local Policies > User Rights Assignment.

3. In the right pane, double-click Log on as a service. The Log on as a service Properties dialog box appears.

4. On the Local Security Setting tab, click Add User or Group.... The Select Users, Computers, Service Accounts, or Groups dialog box appears.

5. In the Enter the object names to select field, specify the user account, and then click OK.

Parsing TSQL operational output into multiple tables The Microsoft application agent supports displaying TSQL operational output in table format and plain text format.

You can parse Microsoft application agent TSQL operational output into separate tables. The following TSQL script shows an example of converting output into another table.

TSQL script for parsing output into multiple tables

USE [master] GO --insert into table declare @t table (msg nvarchar(MAX)) DECLARE @returnCode int insert into @t (msg) EXEC @returnCode = dbo.emc_run_delete' -e now -n mssql - a "DDBOOST_USER = dduser" -a "DEVICE_HOST = ddhost.com" -a "DEVICE_PATH = / ddpath" -a "CLIENT =sqlServerHost"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END --parsing the msg for saveset entries declare @output table( client nvarchar(100), SaveDate nvarchar(100), ssid nvarchar(25), saveset nvarchar(100)) declare @tmpmsg nvarchar(max) declare @begin int, @end int declare @client nvarchar(100), @saveDate nvarchar(100), @ssid nvarchar(25), @saveset nvarchar(100) declare log_cursor CURSOR FOR select * from @t open log_cursor fetch next from log_cursor into @tmpmsg while @@FETCH_STATUS = 0 BEGIN if (PATINDEX('client = %', @tmpmsg) > 0) begin

Configuring Application Direct

54 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

SET @begin = CHARINDEX('=', @tmpmsg, 1) SET @end = CHARINDEX(',', @tmpmsg, @begin) SET @client = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1) SET @begin = CHARINDEX('=', @tmpmsg, @end) SET @end = CHARINDEX('(', @tmpmsg, @begin) SET @saveDate = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1) SET @begin = @end SET @end = CHARINDEX(')', @tmpmsg, @begin) SET @ssid = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1) SET @begin = CHARINDEX('name =', @tmpmsg, @end) SET @saveset = RIGHT(@tmpmsg, LEN(@tmpmsg)-@begin-6) insert into @output(client, SaveDate, ssid, saveset) values (@client, @saveDate, @ssid, @saveset) end fetch next from log_cursor into @tmpmsg END CLOSE log_cursor deallocate log_cursor select * from @output

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 55

Configuring Application Direct

56 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 3

Configuring Storage Direct

This chapter includes the following sections:

l Overview of Storage Direct with SQL Server........................................................................ 58 l Supported configurations of Storage Direct with SQL Server...............................................59 l Configuring Storage Direct with RecoverPoint..................................................................... 59 l Configuring Storage Direct with VMAX.................................................................................66 l Configuring the lockbox.........................................................................................................76 l Configure prerequisites to back up and restore Always On availability groups.......................80 l Parsing TSQL operational output into multiple tables............................................................80

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 57

Overview of Storage Direct with SQL Server Learn about the features and capabilities that the Microsoft application agent for Storage Direct with SQL Server supports.

Storage Direct backups

l Microsoft SQL Server Management Studio plugin, T-SQL and command prompt interfaces to perform backups Backup maintenance operations, such as delete, is available in T-SQL and the command prompt.

l Full backups, in which only changed blocks of the source devices are moved to Data Domain by using Storage Direct technology

l Transaction log backups by using Application Direct workflow

l Hybrid backups that include performing full backups first, and then transaction log backups

l Writer level backups, in which all the instances that are present on a SQL Server are backed up

l Instance level backups, in which all the databases (both user and system databases) of a SQL Server instance are backed up

l Database level backups, in which one or more individual databases are backed up

l Listing, browsing, and deleting of backups

l Backing up databases on RDM devices in virtual environments, VMware and Hyper-V

Storage Direct restores

l Microsoft SQL Server Management Studio plugin, T-SQL and command prompt interfaces to perform restores

l Instance level restores, in which all databases in a server instance are restored

l Database level restores, in which all of the datafiles in a given database are restored

l Table level restores (also known as granular-level restores) using ItemPoint for SQL Server

l Volume level rollback restores, in which the whole volume and all the databases on that volume are replaced

Note: This is an optimized storage level restore where:

n For VMAX, the restore will be done from the latest local snapshot copy

n For XtremeIO with both RecoverPoint and VMAX, the changed blocks are restored if the restore is from a Data Domain copy

l For RecoverPoint 5.0 or later, restores of a partial consistency group or a subset of databases of a consistency group as part of a volume restore

l Redirected restores, where the workflow mounts the backup from Data Domain directly and restores the files that are needed

l Restoring the databases to files

Environmental support

l Coexistence with other backup products that you use to protect data that the Microsoft application agent does not protect However, the Microsoft application agent cannot coexist with the database application agent.

l Common lockbox path, that is, the same lockbox in a common location for the Microsoft application agent, the database application agent, and the Storage Direct agent.

Configuring Storage Direct

58 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l Supports Data Domain High Availability for improved resiliency. Data Domain High Availability on page 38 provides information.

Supported configurations of Storage Direct with SQL Server The Microsoft application agent for Storage Direct with SQL Server supports the following configurations:

l Data Domain High Availability

l An application host with one or more production LUNs that contain application data

l One RecoverPoint cluster on the same data center as the production LUNs

l One Data Domain system directly connected to the RecoverPoint cluster

l Only fibre channel connectivity between RecoverPoint and Data Domain

l MBR or GPT formatted disks because VSS has no restriction on the type of the disk format

l Volumes that are mountable by using either driver letters or mount points

l Up to 64 volumes in a VSS backup session

l Physical environment or VMware ESX or Hyper-V server virtual machines with physical Raw Device Mapping (RDM)

l Any I/O multipathing software such as, PowerPath, Windows MPIO, and so on that is installed for source LUNs

l Configurations, where all the volumes that are to be backed up are present on XtremIO, and configured on RecoverPoint for Storage Direct backups During Storage Direct backups, all the volumes that are included in the backup must be capable of creating RecoverPoint snapshots. Otherwise, the VSS backups fail.

For example, assume the following:

n A SQL Server instance is installed in C:\ (local drive) and the system databases on the same C:\.

n An user database is created on the SQL Server instance, where the data files are stored in E:\ and the transaction logs are stored in F:\, and both E:\ and F:\ are XtremIO volumes. In this case, you cannot back up the entire SQL Server installation because the system databases do not reside on a volume that is capable of creating RecoverPoint snapshots. You can back up only the customers database because both E:\ and F:\ support Storage Direct backups.

l Configurations where all the volumes that are to be backed up are present on VMAX.

Configuring Storage Direct with RecoverPoint The PowerProtect Storage Direct Solutions Guide and the PowerProtect Storage Direct Primary and Protection Storage Configuration Guide provide information about how to configure primary and protection storage for Storage Direct and vdisk.

NOTICE The Microsoft application agent uses a Data Domain Boost storage unit for catalog operations and SQL Server transaction log backups even in Storage Direct environments. Ensure that the Data Domain administrator provides a storage unit.

The RecoverPoint documentation provides information about how to install and configure RecoverPoint.

The XtremIO documentation provides information about how to install and configure the XtremIO storage device.

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 59

Storage Direct with RecoverPoint overview The Microsoft application agent supports Storage Direct type of protection of Microsoft application data on the XtremIO storage devices by using RecoverPoint.

The Microsoft application agent uses the Storage Direct technology to enable snapshot backups of Microsoft applications data from primary storage on an XtremIO system to protection storage on a Data Domain system. This technology provides block movement of data from the XtremIO system source LUNs (managed by RecoverPoint consistency groups) to the Data Domain system. The Microsoft application agent also enables the restoration of Storage Direct backups from the Data Domain system.

A Storage Direct data backup provides a full backup with the cost of an incremental backup. Also, the backup has minimum overhead on the application host because all the changed blocks are moved from XtremIO to Data Domain through a RecoverPoint appliance (RPA).

The DDBEA section of the eLab Navigator at https://elabnavigator.emc.com/eln/ modernHomeDataProtection provides information about the supported platforms, file systems, and volume managers to perform the Storage Direct operations.

Use the Microsoft application agent backup and recovery tools, such as the SQL Server Management Studio plugin, to perform a Storage Direct backup and recovery for SQL Server.

Storage Direct uses the following features on the Data Domain system, RecoverPoint cluster, and XtremIO array to provide data protection:

l On the Data Domain system:

n vdisk and SCSI target services

n FastCopy

n Application Direct

l On the RecoverPoint cluster:

n RecoverPoint consistency groups

l On the XtremIO array:

n XtremIO Initiator Groups

On RecoverPoint, consistency groups protect source LUNs (volumes). Two data sets that depend on each other, such as a database and a database log, are typically part of the same consistency group. Logical components of a consistency group include copies, replication sets, and journals:

l Copies and journals are all the volumes of a consistency group that are either a source or a target of replication at a specific RPA cluster.

l A consistency group consists of one or more replication sets that include a production volume and any local or remote volumes, to which you replicate the production volume. In a consistency group, the number of replication sets equals the number of replicated production volumes.

A RecoverPoint group set is a user-defined set of consistency groups. The RecoverPoint documentation provides information about consistency groups and the procedures to set up consistency groups and their components.

The following conditions apply to Storage Direct operations:

l The local copy in a consistency group exists on the Data Domain system, and no journal volume exists for that local copy. The consistency group can have only one local copy on a Data Domain system.

l You cannot enable parallel bookmarking for a group set.

Configuring Storage Direct

60 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l Deleting a consistency group does not delete the associated static images that backups created on a Data Domain system. You must manually delete the static images according to the Data Domain documentation.

Storage Direct with RecoverPoint topology

The following figure shows a sample Storage Direct topology, with a primary site and a secondary site.

At the primary site, the application host accesses the database data that is stored on the XtremIO system, and the backup data is transferred to the Data Domain system. A separate recovery host is optional. If the recovery is performed to the original application host, the application host is also the recovery host.

Figure 3 Storage Direct with RecoverPoint environment

If you have a secondary site, you can replicate the backup data from the Data Domain system at the primary site to the Data Domain system at the secondary site. At the secondary site, you can also recover the data to an optional recovery host.

Storage Direct with RecoverPoint connectivity requirements Storage Direct with RecoverPoint operations require both IP network (LAN or WAN) and Fibre Channel SAN connections. The following table lists the required types of network connections.

The following table lists the required types of network connections in a RecoverPoint environment:

Table 5 Network connection types in a Storage Direct with RecoverPoint environment

Site Connected components Connection type

Primary site Primary application host to primary XtremIO system

FC

Primary application host to RPA IP

Primary application host to primary Data Domain system

IP or (FC and IP)

Primary XtremIO system to RPA FC and IP

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 61

Table 5 Network connection types in a Storage Direct with RecoverPoint environment (continued)

Site Connected components Connection type

RPA to primary Data Domain system IP and (optional) FC

(Optional) Primary recovery host to primary XtremIO system

FC

(Optional) Primary recovery host to primary Data Domain system

IP or (FC and IP)

(Optional) Primary recovery host to RPA IP

Secondary site (optional)

Secondary recovery host to XtremIO system FC

Secondary recovery host to Data Domain system

FC and IP

Cross-site connections (optional)

Primary application host to Data Domain system

IP

Primary Data Domain system to secondary Data Domain system

IP

Storage Direct with RecoverPoint architecture The following figure illustrates the Storage Direct with RecoverPoint architecture.

Figure 4 Storage Direct with RecoverPoint architecture

The following are the important components of the Microsoft application agent for Storage Direct with RecoverPoint architecture:

l Requestor (Application Agent VSS Requestor): Communicates with the VSS writer and the VSS service to orchestrate the backup and writes the catalog entries, which include the

Configuring Storage Direct

62 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

backup metadata such as, list of the backed up databases, static image names on the Data Domain server.

l Volume Shadow Copy service: Coordinates the actions among backup software, the Microsoft application, and the hardware provider. This component enables creating application-aware backups.

l Hardware Provider (Application Agent VSS Hardware Provider): Creates shadow copies by using Storage Direct technology. This component is implemented as a Windows COM service. This component enables creating a shadow copy, importing the shadow copy, and restoring the shadow copy to the requestor and to the service by using the Storage Direct technology. This component is not a generic provider. It works only with the Microsoft application agent requestor.

l Writer: A Microsoft application.

Create a Storage Direct with RecoverPoint configuration file Create a configuration file with any of the following parameters, as required.

General

The following table describes the parameters for the General configuration file category.

Table 6 General configuration file parameters

Parameter Description

CLIENT= Mandatory.

Specifies the application server hostname, to which you want to back up or restore the databases. In the case of cluster configurations, specify the name of the cluster instance.

LOCKBOX_PATH= Optional.

Specifies the complete directory pathname of the lockbox on the database or application host. For example, C:\Program Files\DPSAPPS\common \lockbox.

DEBUG_LEVEL= Optional.

Specifies whether the software writes debug messages to the debug log file. The default value is 0, in which no debug messages are generated. The highest level is 9, in which the most detailed debug messages are generated.

Primary system

The following table describes the parameters for the Primary system configuration file category.

Table 7 Primary system configuration file parameters

Parameter Description

DDBOOST_USER= Mandatory.

Specifies the username of the DD Boost user.

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 63

Table 7 Primary system configuration file parameters (continued)

Parameter Description

You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

DEVICE_HOST= Mandatory.

Specifies the name of the Data Domain server that contains the storage unit, to which you want to back up and restore the databases with.

You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

DEVICE_PATH= Mandatory.

Specifies the name and the path of the storage unit, to which you want to back up and restore the databases with.

DDVDISK_USER= Optional.

Specifies the Data Domain vdisk user. If you do not specify this parameter, the value defaults to the user specified with the DDBOOST_USER parameter.

DDBOOST_FC={TRUE | FALSE} Optional.

Specifies whether a backup or restore on the primary Data Domain system uses a Fibre Channel (FC) or IP network connection. The default value is FALSE. Specify

TRUE to use an FC network connection during backup

and restore.

Note: If this parameter is set to TRUE, the primary

Data Domain system must be configured to support an FC connection.

DEVICE_FC_SERVICE= Mandatory when the DDBOOST_FC parameter is set to TRUE.

Specifies the name of the FC service configured on the primary Data Domain system to be used for a backup or restore.

RESTORE_DEVICE_POOL= Mandatory.

Specifies the restore device pool that contains the vdisk devices that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device pool.

RESTORE_DEVICE_GROUP= Mandatory.

Configuring Storage Direct

64 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Table 7 Primary system configuration file parameters (continued)

Parameter Description

Specifies the restore device group that contains the vdisk devices and the restore device pool that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device group.

RecoverPoint cluster

The RecoverPoint cluster category is used to configure RecoverPoint operations. The following table describes the parameters for the RecoverPoint cluster configuration file category.

Table 8 RecoverPoint cluster configuration file parameters

Parameter Description

RP_MGMT_HOST= Mandatory.

Specifies the fully qualified hostname of the RecoverPoint Management host.

You must register this hostname and the username in the lockbox so that the Microsoft application agent can retrieve the password for the user.

Type the hostname in the following format:

rp.my-host.com

RP_USER= Mandatory.

Specifies the RecoverPoint username that the hardware provider uses while taking the LUN level snapshots.

You must register this username and the hostname in the lockbox so that the Microsoft application agent can retrieve the password for this user.

For example: recoverpoint-user

Example configuration file

For example, create the C:\ddconfig.cfg file with the following contents:

DDBOOST_USER=DD163_user DEVICE_HOST=ledmd035.lss.example.com DEVICE_PATH=/SU_DD163 LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox" RP_MGMT_HOST=ledmd160.lss.example.com RP_USER=admin DDVDISK_USER=DD163_user CLIENT=mw2k8x64sql2.nmmdev.com

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 65

Configuring Storage Direct with VMAX The PowerProtect Storage Direct Solutions Guide and the PowerProtect Storage Direct Primary and Protection Storage Configuration Guide provide information about how to configure primary and protection storage for Storage Direct and vdisk.

NOTICE The Microsoft application agent uses a Data Domain Boost storage unit for catalog operations and SQL Server transaction log backups even in Storage Direct environments. Ensure that the Data Domain administrator provides a storage unit.

Storage Direct with VMAX overview The Microsoft application agent supports using Storage Direct with VMAX to protect Microsoft applications.

The Microsoft application agent uses Storage Direct with VMAX to take snapshot backups of application data and efficiently move that data to protection storage on a Data Domain system.

Files that cannot be backed up using Storage Direct with VMAX, such as files that do not reside on VMAX or that are not supported for snapshots due to vendor restrictions, are still protected using Application Direct backups.

Recovery is performed using database-specific recovery tools.

The DDBEA section of the eLab Navigator at https://elabnavigator.emc.com/eln/ modernHomeDataProtection provides information about the supported platforms, file systems, and volume managers to perform the Storage Direct with VMAX operations.

The Storage Direct technology uses the following Data Domain and VMAX storage array features:

Table 9 Storage Direct with VMAX technology

System Technology

Data Domain vdisk and SCSI targets

FastCopy

VMAX FAST.X for encapsulating external Data Domain devices

SnapVX for snapshots

When taking backups, Storage Direct first creates a SnapVX snapshot on the VMAX array. It then uses internal tracking information to efficiently move only changed data blocks through a storage area network (SAN) to the destination Data Domain storage device (vdisk), without going through the application host. Data Domain uses these changed blocks to update its most recently stored image.

This approach to transmission and storage allows Storage Direct to take full backups while only incurring the cost of an incremental backup.

Storage Direct backups have minimal overhead on the application host because the protected data is moved directly from the VMAX array to the Data Domain system over a SAN.

Configuring Storage Direct

66 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Supported Storage Direct with VMAX configurations Learn about the supported Storage Direct with VMAX configurations.

Storage Direct environment with a VMAX array on the primary site and a VMAX array on the secondary site

The following figure shows a sample Storage Direct with VMAX topology, with a primary site and an optional secondary site.

At the primary site, the application host accesses the data that is stored on the VMAX array, and the backup data is transferred to the Data Domain system. A separate recovery host is optional. If you perform the restore operation to the original application host, then the application host is also the recovery host.

Figure 5 Storage Direct with VMAX on the primary and secondary sites

You can replicate the backup data from the Data Domain system that is at the primary site to the Data Domain system that is at the secondary site. Also, you can restore the data to the optional recovery host that is at the secondary site. However, you cannot perform a volume level restore, also referred to as a rollback restore.

Storage Direct host with multiple VMAX arrays on the same site

The Microsoft application agent supports backing up and restoring application data residing on multiple VMAX storage arrays on the same site. The following figure shows an example of this topology:

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 67

Figure 6 Storage Direct with multiple VMAX arrays on the same site

After a snapshot backup is started, VSS quiesces all LUNs simultaneously. The VMAX VSS hardware provider takes snapshots of each of the VMAX provisioned LUNs.

Static images containing data from the backed-up LUNs are stored on a single Data Domain system.

Storage Direct with VMAX connectivity requirements Storage Direct with VMAX operations require IP network (LAN or WAN) and FC SAN connections.

The following table lists the required types of network connections in a VMAX environment:

Table 10 Network connection types in a Storage Direct with VMAX environment

Site Connected components Connection type

Primary site Primary application host to primary VMAX system

FC

Primary application host to primary Data Domain system

IP

Primary VMAX system to primary Data Domain system

FC

(Optional) Primary recovery host to primary VMAX system

FC

Configuring Storage Direct

68 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Table 10 Network connection types in a Storage Direct with VMAX environment (continued)

Site Connected components Connection type

(Optional) Primary recovery host to primary Data Domain system

IP

Secondary site (optional)

Secondary recovery host to secondary VMAX system

FC

Secondary recovery host to secondary Data Domain system

IP

Secondary VMAX system to secondary Data Domain system

FC

Cross-site connections (optional)

Primary application host to secondary Data Domain system

IP

Primary Data Domain system to secondary Data Domain system

IP

Primary VMAX system to secondary VMAX system

SRDF/ S, SRDF/A, or SRDF/Metro

Secondary VMAX system to primary Data Domain system

FC, if distance permits

Primary VMAX system to secondary Data Domain system

FC, if distance permits

Storage Direct with VMAX architecture The following figure illustrates the Storage Direct with VMAX architecture.

Figure 7 Storage Direct with VMAX architecture

VMAX replication The Microsoft application agent supports Storage Direct protection that uses a primary or secondary VMAX system in a VMAX replication environment. In this environment, the primary and

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 69

secondary VMAX storage arrays are connected by a Symmetrix Remote Data Facility (SRDF) link in synchronous (SRDF/S), asynchronous (SRDF/A), or metro (SRDF/Metro) configurations.

SRDF is a VMAX feature that maintains a synchronous, real-time copy of data at the LUN level between the primary and secondary VMAX arrays. A source LUN referred to as R1 on the primary array is associated with a source LUN referred to as R2 on the secondary array. The SRDF software maintains continuous synchronization of the two sources by copying all changes on one LUN device to the other. The VMAX documentation provides more details about VMAX replication and the SRDF functionality.

The following figure shows VMAX arrays with an SRDF/S link, where the secondary VMAX system is attached to a secondary Data Domain system. In this SRDF configuration, you can use the Microsoft application agent to perform a Storage Direct backup to the secondary Data Domain system, which backs up the R2 LUN.

Note: The Microsoft application agent also uses the Application Direct workflow to back up any nonsnapshotable files and create catalog entries.

Figure 8 Storage Direct backup to a secondary Data Domain in an SRDF configuration

The following figure shows VMAX arrays with an SRDF/S link, where both the primary and secondary VMAX systems are attached to a Data Domain system. In this SRDF configuration, you can use the Microsoft application agent to perform a Storage Direct backup to either the primary or secondary Data Domain system. The primary Storage Direct backup backs up the R1 LUN to the primary Data Domain system. The secondary Storage Direct backup backs up the R2 LUN to the secondary Data Domain system.

Note: The Microsoft application agent cannot perform backups to both Data Domain systems in the same backup session.

In these SRDF configurations, the Microsoft application agent validates the synchronization of the R1 and R2 LUNs. The Microsoft application agent then creates a SnapVX snapshot of the R2 LUN to transfer the backup data to the secondary Data Domain system.

Configuring Storage Direct

70 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 9 Storage Direct backup to a primary or secondary Data Domain in an SRDF configuration

SRDF/S requirements and configuration support for the Storage Direct Microsoft application agent are as follows:

l The Microsoft application agent automatically determines the state of the SRDF/S link at runtime.

l If there is no SRDF/S link at the start of an operation, then the backup or restore operation fails.

l The Microsoft application agent does not support any changes to the SRDF/S link mode made during a backup or restore operation.

l If the SRDF link is in a failed over or failed back state, then the Microsoft application agent operations fail.

l SRDF replication cannot transition between asynchronous and synchronous modes during any VMAX operation. The mode must remain constant.

l The Microsoft application agent does not support the creation of snapshots of file systems or volume groups that cross SRDF groups.

l The Microsoft application agent supports only single-hop remote connections. The Microsoft application agent does not support cascaded VMAX configurations.

l The Microsoft application agent does not support concurrent SRDF or concurrent SRDF/Star configurations where R1 is a source to two or more concurrent targets.

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 71

Install and configure the VMAX Solutions Enabler Before you begin

Install and configure Solutions Enabler in local mode on the application host. The installation of VMAX Solutions Enabler should be completed before you install Microsoft application agent.

1. To install VMAX Solutions Enabler, run the following command:

-WINDOWS-x64.exe

2. In the installation wizard, select Custom Installation.

3. Specify the VSS Provider option, and leave other options as they are.

4. Complete the installation.

The Solutions Enabler Installation and Configuration Guide provides more information.

Procedure

1. Obtain the following IDs:

l VMAX ID, which is also known as SYMID

l Source (STD) devices

l Backup (FTS) devices

There is 11 mapping between source devices and backup devices, therefore, there is one backup device for each source device.

l Restore (FTS) devices

Ensure that there is at least one restore device for each source device.

Ensure that the VMAX or lab administrator added the restore device to the VMAX storage group. The default name of the VMAX storage group is NSRSnapSG.

Note: Use restore (FTS) devices to perform rollback restores. Use vdisk devices instead of restore (FTS) devices for all other restore types.

2. If you are using a SQL Server virtual machine, add authorization to perform backups.

Ask the ESXi Server administrator to run the following command on the SQL Server virtual machine, on which you perform backups:

symcfg auth add -host -username root -password -namespace vmware/esxv2 -port 5988 -vmware

3. List the VMAX devices to verify the setup by running the following commands from the C:\Program Files\EMC\SYMCLI\bin command prompt:

a. symcfg discover b. sympd list

Note: The output of the sympd list command does not display the backup devices.

4. Establish a link between each source device and the backup device by running the following commands:

a. symsnapvx -sid -devs -name establish

Configuring Storage Direct

72 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

b. symsnapvx -sid link -devs - lndevs -name -copy For example:

symsnapvx -sid 1031 link -devs C5A -lndevs 42 -name SNAPSHOT_C5A -copy

c. To see the status of the operation, run the following command:

symsnapvx -sid -devs list -linked

If the C (copy) flag changes to D (Copied/Destaged), then the operation is completed.

5. Update the Solutions Enabler database by typing the following command:

symcfg discover

The Solutions Enabler database on any host where a backup or recovery might be running must be up-to-date.

6. Configure gatekeepers as described in the PowerProtect Storage Direct Primary and Protection Storage Configuration Guide.

Solutions Enabler requires gatekeepers to control the storage features of VMAX arrays. Gatekeepers are VMAX LUNs that act as the target of command requests to Enginuity

based functionality.

7. For a volume restore, to mount the static image, and restore data directly from Data Domain, mask the Symmetrix FTS restore devices to the application host.

The VMAX documentation provides information about how to mask the FTS devices.

Create a Storage Direct with VMAX configuration file Create a configuration file with any of the following parameters, as required.

General

The following table describes the parameters for the General configuration file category.

Table 11 General configuration file parameters

Parameter Description

CLIENT= Mandatory.

Specifies the application server hostname, to which you want to back up or restore the databases. In the case of cluster configurations, specify the name of the cluster instance.

LOCKBOX_PATH= Optional.

Specifies the complete directory pathname of the lockbox on the database or application host. For

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 73

Table 11 General configuration file parameters (continued)

Parameter Description

example, C:\Program Files\DPSAPPS\common \lockbox.

DEBUG_LEVEL= Optional.

Specifies whether the software writes debug messages to the debug log file. The default value is 0, in which no debug messages are generated. The highest level is 9, in which the most detailed debug messages are generated.

Primary system

The following table describes the parameters for the Primary system configuration file category.

Table 12 Primary system configuration file parameters

Parameter Description

DDBOOST_USER= Mandatory.

Specifies the username of the DD Boost user.

You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

DEVICE_HOST= Mandatory.

Specifies the name of the Data Domain server that contains the storage unit, to which you want to back up and restore the databases with.

You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

DEVICE_PATH= Mandatory.

Specifies the name and the path of the storage unit, to which you want to back up and restore the databases with.

DDVDISK_USER= Optional.

Specifies the Data Domain vdisk user. If you do not specify this parameter, the value defaults to the user specified with the DDBOOST_USER parameter.

DDBOOST_FC={TRUE | FALSE} Optional.

Specifies whether a backup or restore on the primary Data Domain system uses a Fibre Channel (FC) or IP network connection. The default value is FALSE. Specify

TRUE to use an FC network connection during backup

and restore.

Configuring Storage Direct

74 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Table 12 Primary system configuration file parameters (continued)

Parameter Description

Note: If this parameter is set to TRUE, the primary

Data Domain system must be configured to support an FC connection.

DEVICE_FC_SERVICE= Mandatory when the DDBOOST_FC parameter is set to TRUE.

Specifies the name of the FC service configured on the primary Data Domain system to be used for a backup or restore.

RESTORE_DEVICE_POOL= Mandatory.

Specifies the restore device pool that contains the vdisk devices that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device pool.

RESTORE_DEVICE_GROUP= Mandatory.

Specifies the restore device group that contains the vdisk devices and the restore device pool that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device group.

RESTORE_FROM_DD_ONLY=yes Optional.

For rollback restores in VMAX environments, specifies to restore from Data Domain even if the snapshot is available locally, that is, on the VMAX array.

VMAX

The VMAX category is used to configure VMAX operations. The following table describes the parameters for the VMAX configuration file category.

Table 13 VMAX configuration file parameters

Parameter Description

SYMM_SNAP_REMOTE={yes | no} Optional.

Specifies that the Storage Direct backup will use the remote VMAX array when backing up SRDF/S protected volumes.

SNAPSG_NAME= Optional.

Specifies the name of the VMAX storage group to use during a restore to a FAST.X or VMAX native restore device on VMAX.

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 75

Table 13 VMAX configuration file parameters (continued)

Parameter Description

By default, the NsrSnapSG storage group is used for a Storage Direct restore to a VMAX system.

Example configuration file

For example, create the C:\ddconfig.cfg file with the following contents:

DDBOOST_USER=DD163_user DEVICE_HOST=ledmd035.lss.example.com DEVICE_PATH=/SU_DD163 LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox" RP_MGMT_HOST=ledmd160.lss.example.com RP_USER=admin DDVDISK_USER=DD163_user CLIENT=mw2k8x64sql2.nmmdev.com

Configuring the lockbox The lockbox is an encrypted file that the Microsoft application agent uses to store confidential data, such as login credentials, and protect that data from unauthorized access.

Registering a Data Domain or PowerProtect X400 server to a new lockbox creates the PersistedSettings.xml file in the lockbox folder. Registering a server to or removing a server from the lockbox updates the PersistedSettings.xml file.

The PersistedSettings.xml file contains the Data Domain or PowerProtect X400 server information, such as the server name, communication protocol, FC service name, username of the DD Boost user, and storage unit.

Note: For a PowerProtect X400 system, the PowerProtect Data Manager creates a storage unit and automatically configures the lockbox on the application host. For each PowerProtect protection policy, a source lockbox and replication target lockbox are created and configured on the application host.

For a Data Domain system, you can configure one of the following lockbox types according to the environmental requirements.

Single lockbox

In a stand-alone environment, create a single lockbox on the host.

Shared lockbox

In an environment with multiple instances, you can configure a single lockbox in a shared location and grant each remote host individual access to the lockbox.

Note: Do not use a single shared lockbox to perform remote backup operations in a cluster environment. The backup will fail. Use multiple lockboxes in a cluster environment.

Multiple lockboxes

In an environment with multiple instances, you can configure a lockbox on each instance in the environment.

Configuring Storage Direct

76 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Commands to create and manage the lockbox Lockbox operations are administered using the msagentadmin administration command.

Note: The user running the lockbox operations must be an administrator.

When the PowerProtect Data Manager centrally manages the SQL host, the PowerProtect Data Manager automatically performs the lockbox configuration when the PowerProtect protection policy is created and configured.

The following sections describe the commands for creating, registering, and managing the lockbox.

Create a lockbox

To create a lockbox, run the following command:

msagentadmin administration --createLB [--lockbox ] [-- debug 9]

If you don't specify a lockbox directory, the default directory is used, which is C:\Program Files\DPSAPPS\common\lockbox.

Register credentials to the lockbox

To register credentials to the lockbox, run the following command:

msagentadmin administration --registerLB --config [-- confirm] [--debug 9]

Unregister credentials from the lockbox

To delete credentials from the configuration file and lockbox, run the following command:

msagentadmin administration --deleteLB --config [-- confirm] [--debug 9]

Grant a remote host access to the lockbox

To grant a remote host access to the lockbox, run the following command

msagentadmin administration --grantLB [--lockbox ] [-a "LOCKBOX_REMOTE_HOST= "] [-a "VIRTUAL_HOST=yes"] [--debug 9]

Revoke access that a remote host has to the lockbox

To revoke access that a remote host has to the lockbox, run the following command

msagentadmin administration --revokeLB [--lockbox ] [-a "LOCKBOX_REMOTE_HOST= "] [--debug 9]

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 77

Reset the lockbox

To reset the lockbox, run the following command:

msagentadmin administration --updateLB [--lockbox ] [-- debug 9]

Create a custom passphrase

To create a custom passphrase for the lockbox, run the following command:

msagentadmin administration --updateLB -a SET_LOCKBOX_PASSPHRASE=TRUE -a LOCKBOX_PATH=

After typing this command, the following prompts appear. Use the prompts to set the passphrase.

Enter a passphrase (refer to the administration guide for passphrase complexity requirements): Confirm the passphrase:

The following output appears:

The passphrase for the lockbox ' ' in the directory ' ' has been updated.

Note: The custom passphrase must meet the following complexity requirements:

l Minimum length of nine characters.

l Minimum of one uppercase character.

l Minimum of one lowercase character.

l Minimum of one special character.

l Minimum of one digit.

Use the custom passphrase to reset the lockbox

The passphrase may be used to restore access to a host that cannot access the lockbox.

To use the custom passphrase to reset the lockbox, run the following command:

msagentadmin administration --updateLB -a USE_LOCKBOX_PASSPHRASE=TRUE -a LOCKBOX_PATH=

After typing this command, the following prompt appears. Use the prompt to set the passphrase.

Enter a previously set passphrase:

The following output appears:

The lockbox ' ' in the directory ' ' has been reset.

Configuring Storage Direct

78 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Create a custom security option for a lower system stable values (SSV) threshold

To create a custom security option for lower security in the system stable values (SSV) threshold for the lockbox, run the following command:

msagentadmin administration --updateLB -a SET_LOCKBOX_SECURITY="custom" -a LOCKBOX_PATH=

This command is useful when the lockbox becomes frequently inaccessible after regular system upgrades. However, it is recommended that you use the passphrase to reset the lockbox instead of customizing the security level.

Import the lockbox

To import the lockbox, run the following command:

msagentadmin administration --updateLB -a LOCKBOX_IMPORT=yes -a LOCKBOX_PATH=

This command is useful when the lockbox is created in a non-default directory and the lockbox needs to be upgraded (imported) to the latest version.

Create a lockbox Use the following steps to create a lockbox and add credentials to it.

Procedure

1. Create the lockbox using the following command:

msagentadmin administration --createLB

For example, to create a lockbox in the folder C:\Lockboxes type the following command:

msagentadmin administration --createLB --lockbox C:\Lockboxes

If you don't specify a folder, the lockbox is created in the default directory, which is C:\Program Files\DPSAPPS\common\lockbox.

NOTICE When the Microsoft application agent is integrated with PowerProtect, the lockbox must be located in the default directory.

2. Create a configuration file that contains the appropriate credentials.

For example, type the following command to edit config.cfg:

notepad c:\Lockboxes\config.cfg

Then add the appropriate configurations to the configuration file. For example, to register a Data Domain server, add the following credentials:

LOCKBOX_PATH=C:\Lockboxes DDBOOST_USER=ddvdisk DEVICE_HOST=ledmd034.lss.emc.com DEVICE_PATH=/ddbdatest/mattp/pp

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 79

3. Use the configuration file to register the credentials with the lockbox by typing the following command:

msagentadmin administration --registerLB --config " "

For example:

msagentadmin.exe administration --registerLB --config "C:\lockbox- config-details.cfg"

You are prompted for any required passwords for the configured user accounts.

Configure prerequisites to back up and restore Always On availability groups

You must meet the following configuration requirements to perform backups and restores of SQL Always On availability groups:

Install the Microsoft application agent on each node

You must install the Microsoft application agent on all the nodes that are in the Always On availability group.

Configure a the lockbox

You must use configure either a single shared lockbox or a separate lockbox on each node that is in the Always On availability group.

Provision restore devices

The storage administrator must provision all of the restore vdisk and FTS restore devices on each node where the restore might happen. The PowerProtect Storage Direct Primary and Protection Storage Configuration Guide provides information.

Parsing TSQL operational output into multiple tables The Microsoft application agent supports displaying TSQL operational output in table format and plain text format.

You can parse Microsoft application agent TSQL operational output into separate tables. The following TSQL script shows an example of converting output into another table.

TSQL script for parsing output into multiple tables

USE [master] GO --insert into table declare @t table (msg nvarchar(MAX)) DECLARE @returnCode int insert into @t (msg) EXEC @returnCode = dbo.emc_run_delete' -e now -n mssql - a "DDBOOST_USER = dduser" -a "DEVICE_HOST = ddhost.com" -a "DEVICE_PATH = / ddpath" -a "CLIENT =sqlServerHost"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Configuring Storage Direct

80 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

--parsing the msg for saveset entries declare @output table( client nvarchar(100), SaveDate nvarchar(100), ssid nvarchar(25), saveset nvarchar(100)) declare @tmpmsg nvarchar(max) declare @begin int, @end int declare @client nvarchar(100), @saveDate nvarchar(100), @ssid nvarchar(25), @saveset nvarchar(100) declare log_cursor CURSOR FOR select * from @t open log_cursor fetch next from log_cursor into @tmpmsg while @@FETCH_STATUS = 0 BEGIN if (PATINDEX('client = %', @tmpmsg) > 0) begin SET @begin = CHARINDEX('=', @tmpmsg, 1) SET @end = CHARINDEX(',', @tmpmsg, @begin) SET @client = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1) SET @begin = CHARINDEX('=', @tmpmsg, @end) SET @end = CHARINDEX('(', @tmpmsg, @begin) SET @saveDate = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1) SET @begin = @end SET @end = CHARINDEX(')', @tmpmsg, @begin) SET @ssid = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1) SET @begin = CHARINDEX('name =', @tmpmsg, @end) SET @saveset = RIGHT(@tmpmsg, LEN(@tmpmsg)-@begin-6) insert into @output(client, SaveDate, ssid, saveset) values (@client, @saveDate, @ssid, @saveset) end fetch next from log_cursor into @tmpmsg END CLOSE log_cursor deallocate log_cursor select * from @output

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 81

Configuring Storage Direct

82 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

PART 2

Backing Up SQL Server

This part includes the following chapters:

Chapter 4, "Backing Up SQL Server with Application Direct"

Chapter 5, "Backing Up SQL Server with Storage Direct"

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 83

Backing Up SQL Server

84 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 4

Backing Up SQL Server with Application Direct

This chapter includes the following sections:

l Overview of Application Direct with SQL Server backups..................................................... 86 l Best practices to back up SQL Server with Application Direct.............................................. 87 l Naming conventions for backups with Application Direct...................................................... 88 l Circumstances that promote SQL Server backups to level full ............................................. 89 l Scheduling backup jobs......................................................................................................... 89 l Performing manual backups ..................................................................................................97 l Listing backups.....................................................................................................................115 l Move and recall save sets on a Data Domain Cloud Tier.......................................................120 l Deleting backups..................................................................................................................123

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 85

Overview of Application Direct with SQL Server backups The Microsoft application agent for Application Direct with SQL Server module integrates with the SQL Virtual Device Interface (VDI).

The interface enables you to configure the module by using a SQL Server Management Studio plug-in.

The plug-in is similar to the SQL native backup and restore graphical user interface (GUI). Database administrators (DBAs) can use the Microsoft native tools to back up and restore the SQL data.

Note: Self-service backups and restores are backups and restores that you perform through the SQL Server Management Studio (SSMS), Transact-SQL (T-SQL) scripting, or the Microsoft application agent command-line interface.

Application Direct backups to a Data Domain or PowerProtect X400 system use the following components:

l The Application Direct library API enables the backup software to communicate with the Data Domain or PowerProtect X400 system.

The DDBEA section of the eLab Navigator at https://elabnavigator.emc.com/eln/ modernHomeDataProtection provides information about the supported versions of the Application Direct library and the Data Domain or PowerProtect X400 operating system.

l The distributed segment processing component reviews the data that is already stored on the Data Domain system, and sends only unique data for storage. The distributed segment processing component enables the backup data to be deduplicated on the database or application host to reduce the amount of data transferred over the network. Distributed segment processing on page 36 provides information.

When the Data Domain system restores data to a client, the system converts the stored data to its original non-deduplicated state before sending it over the network.

Federated backups of Always On availability groups You can use the SQL Server's Always On availability groups feature to place databases in an Availability Group for high availability.

The database administrator can set backup preferences for the availability group and nominate a particular copy, which can be either the primary copy or one of the secondary copies, to use for the backup.

The Microsoft application agent supports federated backups for Application Direct backups. During federated backups, the Microsoft application agent detects the SQL Server's backup preferences setting for the availability group, and then performs the backup on the preferred node.

Note: On a secondary node, SQL Server supports only copy-only backups of databases. If the preferred node is a secondary node, the Microsoft application agent performs a copy-only backup of databases. SQL Server does not support differential backups on secondary SQL Server replicas. However, you can perform transaction log backups from either copies.

The following figure illustrates an overview of the process interactions during federated backups. In the figure, the backup starts on Node A, but Node B is preferred.

Backing Up SQL Server with Application Direct

86 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 10 Federated backup command and data flow

Best practices to back up SQL Server with Application Direct Consider the best practices to back up SQL Server using Application Direct.

Configure backups to use the same Data Domain path

To ensure the consistency of the backups on the Data Domain system, configure all the backups of a SQL Server instance to use the same Data Domain system and path.

Configure connection settings

Data Domain Boost and PowerProtect X400 devices do not distinguish among Transmission Control Protocol (TCP)/Internet Protocol (IP), Fibre Channel (FC), and LAN, WAN, and MAN network types. Data Domain Boost and PowerProtect X400 devices can successfully operate where packet loss is strictly 0% and latency is less than 20 ms.

Use supported characters

For Data Domain and PowerProtect X400 systems, the Microsoft application supports locale- specific date and time processing and setting the date and time display language can be set to non-English characters. However, database and path names must be written in ASCII characters only. Naming conventions for backups with Application Direct on page 88 provides more information on supported characters for database and instance names.

Configure Data Domain quota limits

The Microsoft application agent does not have a parameter to control the total size that it consumes. The quota limits can only be set on the Data Domain system on a per-MTree (storage unit) basis.

An MTree's quota limits are calculated based on the logical size, which is the size before compression and de-duplication of the data.

The quota limits impact only backup operations.

Configuring usage limits of Data Domain resources on page 31 provides more information about quota limit, impact of exceeding the limits, and configuring the usage limits.

Configure usage limits for Data Domain streams

Configure a sufficient number of Data Domain streams for better performance of backups and restores. The streams control backup and restore parallelism for each database.

The Microsoft application agent requires one stream per save set that you back up or restore. When you perform striped backups, each stripe requires one stream. The stripes are concurrently

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 87

executed for each database. Databases are sequentially backed up and restored. When you use stripes, the number of streams must be equal to or more than the number of stripes.

The minimum number of streams for a non-stripe environment is 1.

Configuring usage limits of Data Domain streams on page 33 provides more information about streams limit, impact of exceeding the limits, and configuring the usage limits.

Naming conventions for backups with Application Direct When naming SQL Server instance, database, and filegroups, consider that the Microsoft application agent does not distinguish the difference between upper and lowercase letters. The names are not case-sensitive.

Therefore, if there are two or more databases with the same name but with different capitalization, such as DB1 and db1, the Microsoft application agent views these databases as the same and by default backs up only one of the databases.

The following table described the special characters that are supported for naming database backups in SQL stand-alone, cluster, and Always On availability group configurations with Application Direct.

Table 14 Supported special characters

Special character Name

~ Tilde

` Accent grave

! Exclamation mark

@ At the rate

% Percentage

^ Caret

& Ampersand

( Open parenthesis

) Close parenthesis

- Hyphen

_ Underscore

{ Open curly bracket

} Close curly bracket

\ Backslash

. Period

' Apostrophe

Note: While SQL Server supports naming instances with the hash symbol (#), the Microsoft application agent does not. If an instance includes a hash symbol, backups of that instance will fail.

Backing Up SQL Server with Application Direct

88 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Circumstances that promote SQL Server backups to level full Transaction log backups are promoted to full backups in certain situations.

By default, transaction log backups are promoted to level full in the following scenarios:

l When there is not an existing level full backup.

l When a log gap is detected.

l When the recovery model is changed.

l When the backup includes simple model databases, either the simple model databases are promoted to a full backup or the simple model databases are skipped, depending on the backup settings.

Options to tune the behavior of automatic promotion are available while configuring a backup. The ddbmsqlsv -a "BACKUP_PROMOTION" command flag and the Microsoft app agent for Application Direct SSMS plugin Backup Promotion option both control backup promotion.

Scheduling backup jobs You can schedule Microsoft SQL Server backup jobs by using either the SQL Server Agent or the Windows Task Scheduler.

Scheduling SQL Server backups by using SQL Server Agent The SQL Server Agent is a job-scheduling agent which is contained in the Microsoft SQL Server package.

This section describes how to schedule SQL Server backups by using the SQL Server Agent job for the CmdExec and T-SQL subsystems. The SQL Server Agent, a job-scheduling agent within the SQL Server package, consists of a Windows service that runs jobs.

Each job can contain one or more job steps and each step can contain its own tasks. The Microsoft application agent uses SQL Server to store job information and can run jobs on a schedule in response to a specific event or in response to a specific demand.

Configuring the SQL Server Agent to schedule jobs

Configuring the SQL Server Agent comprises of the following tasks:

l Enabling the SQL Server Agent

l Configuring security

Enabling the SQL Server Agent

The SQL Server Agent is in disabled state, by default. To enable the SQL Server Agent:

1. Open SSMS, and then select View > Object Explorer.

2. Right-click SQL Server Agent, and then select Start.

Configuring security

To run the Microsoft application agent command prompt commands in the CmdExec subsystem, you must have administrator privileges. You can either change the SQL Server Agent service login credentials to administrator or configure a proxy host to the CmdExec subsystem.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 89

Changing the SQL Server Agent service login credentials Procedure

1. From the Windows desktop, click Start > Run.

2. In the Run dialog box, in the Open field, type services.msc, and then click OK.

3. In the Services window, right-click SQL Server Agent Service, and then select Properties.

4. In the SQL Server Agent Service Properties dialog box:

a. On the Log On tab, select This account.

b. Type the administrator user credentials in the relevant fields. You can also click Browse and select the user who has the administrator privileges.

c. Click OK.

Creating a proxy for the CmdExec subsystem The SQL Server Agent uses proxies, which are objects that enable the SQL Server Agent to access stored credentials for Windows users, to define the security context for job steps.

About this task

When you run a job step that is configured to use a proxy, the SQL Server Agent uses the credentials that are defined in the proxy, and then uses the corresponding security context to run the job step.

Procedure

1. Open SSMS, and then select View > Object Explorer.

2. Specify user credentials:

a. In the Object Explorer, expand Security, right-click Credentials, and then select Properties.

b. On the Credential Properties - EMC page, specify the following fields, and then click OK:

l Credential name: Type a name for the credential.

l Identity: Type the administrator username.

l Password: Type the password for the user that you specified in the Identity field.

l Confirm password: Retype the password that you specified in the Password field.

3. Create a proxy:

a. In the Object Explorer, expand SQL Server Agent, and then expand Proxies.

b. Right-click Proxies, and then select New proxy.

c. On the EMC Proxy Account Properties page, specify the following fields, and then click OK:

l Proxy name: Type a name for the proxy.

l Credential name: Type the credential name that you specified in step 2b.

l Active to the following subsystems: Under this field, select Operating system (CmdExec).

Backing Up SQL Server with Application Direct

90 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Note: When you create a job step, you must select this proxy from the Run as list on the Job Step Properties page.

Scheduling a CmdExec job You can schedule a CmdExec job on either a single SQL Server or multiple SQL Servers.

Scheduling a CmdExec job on a single SQL Server Procedure

1. Open SSMS, and then select View > Object Explorer.

2. In the Object Explorer, expand SQL Server Agent, right-click Jobs, and then select New job.

3. On the Job Properties window:

a. On the General page, type the appropriate information in the Name, Owner, and Description fields.

b. On the Steps page, click New to create a step.

c. In the Job Step Properties window, on the General page, specify the following fields:

l Step name: Type a name for the job step.

l Type: Select Operating system (CmdExec).

l Run as: According to your configuration, select either proxy or SQL Server Agent Service Account.

l Process execute exit code of a successful command: Type the process success exit code.

l Command: Specify the required command. Perform backups with the Microsoft app agent for Application Direct SSMS plug-in on page 97 provides information about how to generate the command.

The generated command does not have a full path to the binary. When you specify the generated command in this field, you must add the full path to the binary. If the binary path contains spaces, specify the path in the quotes.

For example:

"C:\Program Files\DPSAPPS\MSAPPAGENT\bin\ddbmsqlsv.exe" -D9 -c NMMDB154.nmmdev.com -l full -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.192.14" -a "NSR_DFA_SI_DD_USER=ddbma" -a "NSR_DFA_SI_DEVICE_PATH=/ddbma- sqlagent2" "MSSQL:master".

d. On the Advanced page, specify the following fields:

l On success action: Select whether to proceed to the next job step or quit the current job step and report success, after the current job step succeeds.

l Specify the other fields according to your requirements.

l Click OK.

e. On the Schedules page, click New to schedule a job.

f. In the Job Schedule Properties window, specify appropriate information in the corresponding fields, and then click OK.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 91

g. On the Alerts page, click Add to create an alert that will perform a job when a certain event occurs.

h. In the New Alert window, on the General page, specify the following fields:

l Name: Type a name for the alert.

l Type: Select the type of the event.

l Specify the appropriate information in the other fields.

i. On the Response page, specify the following fields:

l Notify operators: Select this option to send a message to the operators about the job step status.

l New Operator: Click this button to add an operator to the Operator list.

j. On the Options page, configure a method, such as E-mail, Pager, or Net Send, to notify operators about the status of the job step.

k. On the Notifications page, under Actions to perform when the job completes, select the appropriate notification methods to notify operators about the status of the job step.

l. On the Targets page, select Target local server.

m. Click OK.

Scheduling a CmdExec job on multiple SQL Servers Scheduling jobs from one central location to multiple target SQL Servers eases the database administrators job. To configure this setup, you must install the Microsoft application agent on all target hosts, make one SQL Server Agent a master, and make the rest of the hosts targets.

Configuring master and target SQL Server Agents Procedure

1. Open the SSMS, and then select View > Object Explorer.

2. Right-click SQL Server Agent, and then select Multi Server Administrator > Make this a Master.

The Master Server Wizard appears.

3. On the Welcome to the Master Server Wizard page, click Next.

4. On the Master Server Operator page, type the appropriate information in the E-mail address, Pager address, and Net send address fields to notify the operators about the status of the job, and then click Next.

5. On the Target Servers page:

a. Under the Registered servers panel, select the servers that you want to use as targets for the SQL Server Agent jobs, and then click the right arrow to move them to the Target servers panel.

b. If you want to add servers to the Registered servers panel, click Add Connection.

c. In the Checking Server Compatibility dialog box, review the information, and then click Close. The Master Server Login Credentials page appears.

6. Enable SQL Server remote connectivity:

a. In SSMS, right-click the SQL Server, and then click Properties.

Backing Up SQL Server with Application Direct

92 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

b. In the Server Properties window, under the Select a page group, select Connections.

c. Select Allow remote connections to this server.

d. Click OK.

7. Specify general firewall exceptions on the SQL Server.

8. If an SSL certificate does not exist, set the encryption level on the target hosts to 1 or 0 according to the security level you need.

To set the encryption level, change the MsxEncryptChannelOptions registry entry to 1 or 0. The registry key is located in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft \Microsoft SQL Server\ \SQLServerAgent\.

9. On the Master Server Login Credentials page, click Next.

10. On the Complete the Wizard page, review the information, and then click Finish.

Running a job on the target servers Procedure

1. Open the SSMS, and then select View > Object Explorer.

2. In the Object Explorer, expand SQL Server Agent, right-click Jobs, and then select New job.

3. On the Job Properties window:

a. On the General page, type the appropriate information in the Name, Owner, and Description fields.

b. On the Steps page, click New to create a step.

c. In the Job Step Properties window, complete the following steps:

a. On the General page, specify the following fields:

l Step name: Type a name for the job step.

l Type: Select Operating system (CmdExec).

l Run as: According to your configuration, select either proxy or SQL Server Agent Service Account.

l Process execute exit code of a successful command: Type the process success exit code.

l Command: Specify the required command. Perform backups with the Microsoft app agent for Application Direct SSMS plug- in on page 97 provides information about how to generate the command.

The generated command does not have a full path to the binary. When you specify the generated command in this field, you must add the full path to the binary. If the binary path contains spaces, specify the path in the quotes.

For example:

"C:\Program Files\DPSAPPS\MSAPPAGENT\bin\ddbmsqlsv.exe" -D9 -c NMMDB154.nmmdev.com -l full -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.192.14" - a "NSR_DFA_SI_DD_USER=ddbma" -a "NSR_DFA_SI_DEVICE_PATH=/ddbma- sqlagent2" "MSSQL:master"

b. On the Advanced page, specify the following fields:

l On success action: Select whether to proceed to the next job step or quit the current job step and report success, after the current job step succeeds.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 93

l Specify the other fields according to your requirements.

l Click OK.

d. On the Schedules page, click New to schedule a job.

e. In the Job Schedule Properties window, specify appropriate information in the corresponding fields, and then click OK.

f. On the Alerts page, click Add to create an alert that will perform a job when a certain event occurs.

g. In the New Alert window:

a. On the General page, specify the following fields.

l Name: Type a name for the alert.

l Type: Select the type of the event.

l Specify the appropriate information in the other fields.

b. On the Response page, specify the following fields:

l Notify operators: Select this option to send a message to the operators about the job step status.

l New Operator: Click this button to add an operator to the Operator list.

c. On the Options page, configure a method, such as E-mail, Pager, or Net Send, to notify operators about the status of the job step.

d. On the Notifications page, under Actions to perform when the job completes, select the appropriate notification methods to notify operators about the status of the job step.

e. On the Targets page, from the Target multiple servers list, select the target servers.

h. Click OK.

Scheduling a T-SQL job T-SQL subsystem does not work under proxies.

Procedure

1. Open the SSMS, and then select View > Object Explorer.

2. In the Object Explorer, expand SQL Server Agent, right-click Jobs, and then select New job.

3. In the Job Properties window:

a. On the General page, specify the following fields:

l Name: Type a name for the job.

l Owner: Click the button beside the text box, and then complete the following steps:

a. In the Select Login dialog box, click Browse.

b. In the Browse for Objects dialog box, under Matching objects, select NT SERVICE\SQLSERVERAGENT, and then click OK.

c. In the Select Login dialog box, click OK.

l Description: Type a description for the job.

b. On the Steps page, click New.

Backing Up SQL Server with Application Direct

94 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

c. In the Job Step Properties window, on the General page, specify the following fields:

l Step name: Type a name for the job step.

l Type: Select Transact-SQL script (T-SQL).

l Run as: Select SQL Server Agent Service Account.

l Process execute exit code of a successful command: Type the process success exit code.

l Command: Specify the required T-SQL command. Perform backups with the Microsoft app agent for Application Direct SSMS plug-in on page 97 provides information about how to generate the T-SQL command.

You can run the generated T-SQL command by using the New Query menu option to check whether the operation succeeds. If the command runs successfully, the scheduled backups will be successful.

If you want to use return codes in the generated T-SQL command, you must modify the command.

Consider the following example raw T-SQL command:

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_backup ' -c NMMDB154.nmmdev.com - l full -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.192.14" -a "NSR_DFA_SI_DD_USER=ddbma" -a "NSR_DFA_SI_DEVICE_PATH=/ddbma-sqlagent2" "MSSQL:Fabrics"' PRINT @returnCode GO

Consider the following example T-SQL command with return codes:

DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_backup ' -c NMMDA224.heroines.local -l full -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.77.27" -a "NSR_DFA_SI_DD_USER=ost112" -a "NSR_DFA_SI_DEVICE_PATH=/heroines" "MSSQL:CopyOftest_db_1" "MSSQL:db1"' IF @returnCode <>0 BEGIN RAISERROR ('Fail!', 16, 1) END

If the return code is error, the job step fails.

Note: The last two parameters, 16 and 1 are necessary to raise an error if a job step fails.

d. On the Advanced page, specify the following fields:

l On success action: Select whether to proceed to the next job step or quit the current job step and report success, after the current job step succeeds.

l Specify the other fields according to your requirements.

l Click OK.

l On the Schedules page, click New to schedule a job.

l In the Job Schedule Properties window, specify appropriate information in the corresponding fields, and then click OK.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 95

l On the Alerts page, click Add to create an alert that will perform a job when a certain event occurs.

l In the New Alert window: On the General page, specify the following fields.

n Name: Type a name for the alert.

n Type: Select the type of the event.

n Specify the appropriate information in the other fields.

e. On the Response page, specify the following fields:

l Notify operators: Select this option to send a message to the operators about the job step status.

l New Operator: Click this button to add an operator to the Operator list.

f. On the Options page, configure a method, such as E-mail, Pager, or Net Send, to notify operators about the status of the job step.

g. On the Notifications page, under Actions to perform when the job completes, select the appropriate notification methods to notify operators about the status of the job step.

h. On the Targets page, select Target local server.

i. Click OK.

After you finish

To check the status of a job, either right-click the job and select View History or review the log files in the nsr/applogs/ folder.

Scheduling SQL Server backups by using Windows Task Scheduler To schedule SQL Server backups by using Windows Task Scheduler, perform the following steps:

Procedure

1. On the Windows desktop, click Start > All Programs > Accessories > System Tools > Task Scheduler.

2. In the left pane of the Task Scheduler window, right-click Task Scheduler Library, and then select Create Basic Task.

The Create Basic Task Wizard wizard appears.

3. On the Create a Basic Task page, in the Name field, type a name for the task, and then click Next.

4. On the Task Trigger page, select the appropriate option to start the task, and then click Next.

The page that corresponds to the selected option appears.

5. Specify or select all the fields that you require to perform the task, and then click Next.

6. On the Action page, select Start a program, and then click Next.

7. On the Start a program page, browse for the .bat file and in the Program/script field, type the file path, and then click Next.

8. On the Summary page, review the details of the task, and then click Finish.

The process creates the task and adds it to your Windows schedule.

Backing Up SQL Server with Application Direct

96 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Performing manual backups The Microsoft application agent for Application Direct with SQL Server supports multiple tools to perform manual backups.

You can configure backups using the Microsoft application agent SQL Server Management Studio plug-in (GUI), Microsoft application agent for Application Direct commands, or T-SQL scripts.

Perform backups with the Microsoft app agent for Application Direct SSMS plug-in

The Microsoft application agent supports a user interface to perform backup operations through a SQL Server Management Studio (SSMS) plug-in.

About this task

If the Data Domain device is connected only on the backup LAN, and the SQL host is multi-homed and has an interface on the backup LAN, the backups to the Data Domain device proceed over the backup LAN by default.

If both the Data Domain device and the SQL host are multi-homed, and are connected to the backup LAN, ensure that the Data Domain server name that you specify in the Microsoft app agent for Application Direct SSMS plug-in is the same as the backup LAN IP address. The backups to the Data Domain device proceed over the backup LAN.

To back up SQL Server to a Data Domain server over fibre channel (FC), you must first configure FC on the Data Domain server.

The Script view is available in each page of the Backup tab, which generates a command prompt equivalent script. You can use the script to create a .bat file to perform scheduled backups, automation, and other tasks. The following script options are available:

l CLI Scripts: To generate the CLI script, which you can use to run a backup from the CLI.

l T-SQL Scripts: To generate a backup script in the T-SQL format.

Configure general backup settings To configure SQL backups with the Microsoft app agent for Application Direct SSMS plug-in, you must first specify general backup options on the Backup > General page.

Procedure

1. Open the Microsoft app agent for Application Direct window to the Backup > General page.

The General page appears as shown in the following figure.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 97

Figure 11 Application Direct - Backup-General page

2. Leave the SQL Server Host as-is. The instance is populated by default.

3. In the SQL Server Instance field, select the name of the SQL Server instance that contains the databases that you want to back up.

4. In the Database Filter list, select one of the following options:

l All Databases: Displays the regular databases and the Always On availability group databases of the selected SQL Server instance in the database table, which is located below the Database Filter field. This option is selected by default.

You can back up the Always On availability group databases as regular databases without considering the Always On availability group preferences.

l Non AAG Databases: Displays only the regular databases of the selected SQL Server instance in the database table.

l A list of Always On availability groups if available: Selecting one of the Always On availability groups displays the corresponding databases in the database table. The Connections panel displays the name of the cluster that contains the Always On availability group and the backup preference that specifies the preferred replica to perform the backup. You can configure the replica preference of the Always On availability groups through the SSMS.

5. In the database table, select either all the databases by selecting the checkbox in the header row or only the individual databases that you want to back up.

6. In the Backup type list, select the type of the backup that you want to perform such as, Full, Transaction log, or Differential.

Backing Up SQL Server with Application Direct

98 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

7. (Optional) To perform a copy-only backup, select Copy-only backup.

Copy-only backups do not disturb the SQL Server backup chain or affect backup-level promotion and log truncation. Copy-only backups are supported for level full or transaction log backups.

8. (Optional) To exclude databases from a SQL Server instance-level backup, perform the following steps:

a. Click the Excluded Databases button.

The Exclude Databases window appears.

b. Select each database that you want to exclude from the backup.

c. Click OK.

The databases that are selected for exclusion appear grayed out in the list of databases and the number of excluded databases is displayed.

9. In the Name field, type a name for the backup that you want to perform.

After the backup completes, the save set names of the backed-up databases will be in the following format:

: For example, you select the databases db1 and db2, specify test as the backup or save set name, and then perform the backup. After the backup completes, the save set names of the backed-up databases are test: db1 and test:db2.

Note: The number sign (#) character is not supported for save set names. If you use this character, backups fail.

10. In the Description field, type a description for the backup that you want to perform.

11. In the Expires after (days) field, select the number of days after which the backup must expire. The default value is 30.

12. Under Destination, to select the target Data Domain or PowerProtect X400 server for the backup, perform the following steps:

a. Click the Data Domain Server browse button.

The Data Domain Connection List & Lockbox Settings dialog box appears, as shown in the following figure.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 99

Figure 12 Data Domain connection list and lockbox settings

b. In the Lockbox Folder field, type the path to lockbox, and then click Refresh.

The default path to the lockbox is C:\Program Files\DPSAPPS\common\lockbox.

The DataDomain Connections list is refreshed.

c. In the DataDomain Connections table, select the target Data Domain or PowerProtect X400 server for the backup.

d. (Optional) To add or remove Data Domain or PowerProtect X400 servers from the DataDomain Connections table, perform one of the following action sequences:

l To add a server, perform the following steps:

a. Click Add. The Add Data Domain Server details dialog box appears as shown in the following figure.

Figure 13 Data Domain - Add Data Domain server details

b. In the DataDomain Server field, type the name of the server.

c. In the Communication Protocol list, select either Ethernet or Fibre channel, the medium through which you want to back up the database to the server. Ethernet is selected by default.

Backing Up SQL Server with Application Direct

100 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

d. If you have selected Fibre channel from the Communication Protocol list, type the name of the Data Domain server as the FC service name in the FC Service Name field.

e. In the User Name field, type the username of the DD Boost user.

f. In the Password field, type the password of the DD Boost user.

g. In the Storage Unit field, type the name of the target storage unit for the backup. Data Domain Boost or PowerProtect X400 user credentials are verified before they are saved in the lockbox. Verification of the user credentials requires some time to complete.

l To remove a Data Domain or PowerProtect X400 server, select the server, and then click Remove.

l To add a SQL virtual server to either back up databases to SQL clustered instances or restore databases from SQL clustered instances, perform the following steps:

n Select Edit LockBox Settings.

n In the Enter Host Name field, type the FQDN of the SQL virtual server.

n Click OK.

l To remove a SQL virtual server, select the FQDN of the SQL virtual server from the Select Host Name list, and then click Remove.

The PersistedSettings.xml file in the lockbox folder contains the information about Data Domain or PowerProtect X400 servers. Adding a server to a new lockbox creates the PersistedSettings.xml file. Adding a server to or removing a server from the lockbox updates the PersistedSettings.xml file.

13. To start the backup operation, click Run.

Configure optional backup settings When you configure SQL backups with the Microsoft app agent for Application Direct SSMS plug- in, you can specify optional backup settings on the Backup > Options page.

About this task

All settings on the Options page are optional.

Procedure

1. From the left panel, click Options to specify optional backup settings.

The Options page appears as shown in the following figure.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 101

Figure 14 Application Direct - Backup-Options page

2. To perform a checksum operation with the backup and save the information to the backup media, select Perform checksum before writing to media.

The Microsoft application agent performs another checksum before a restore to ensure that the checksum matches the backup.

3. To use a checksum to detect a partial backup or restore state, select Continue on error.

The SQL Server verifies the checksum by calculating a local result and comparing the result with the stored value. If the values do not match and you encounter errors, you can select this option to continue the backup or restore operation.

4. To truncate the transaction logs before a backup, select Truncate the transaction log.

The Microsoft application agent enables this option if you select transaction log as the backup type.

5. To perform a tail-log backup of the database and leave the database in the restoring state, select Backup the tail of the log and leave database in restoring state.

6. Under Stripes, select Create a striped backup to create a striped backup. You can also specify the number of stripes. If you specify a value greater than the maximum limit of 32, the value defaults to 32.

7. To promote backups of SIMPLE recovery model databases to level full, select Promote to full backup.

SIMPLE recovery model databases do not support transaction log backups. The Microsoft application agent enables this option if you select the SIMPLE recovery model databases to back up, and transaction log as the backup type.

Backing Up SQL Server with Application Direct

102 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

8. To omit SIMPLE recovery model databases from the backup, select Skip backup.

Microsoft application agent enables this option if you select the SIMPLE recovery model databases to back up, and transaction log as the backup type. SIMPLE recovery model databases do not support transaction log backups.

9. To check the status of the selected databases and ignore the databases that are unready or unavailable for the backup, select Skip databases that cannot be backed up at its current state.

If the status of the databases is ONLINE, the databases are ready or available for backups.

If the status of the databases is OFFLINE, EMERGENCY (SINGLE_USER Mode), SUSPECT, RESTORING, RECOVERING, or RECOVERY_PENDING, the databases are unready or unavailable for backups.

10. To generate detailed logs, which you can use to troubleshoot backup issues, specify a number between 1 and 9 in the Select a debug level field. The default value is 0 (zero).

11. To delete debug logs older than a certain number of days, in the Delete debug logs after field, specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

12. To specify backup promotion options, select one of the following values from the Backup Promotion list:

l ALL: Enables backup promotion to occur in any applicable scenario.

l NONE: Disables all backup promotion.

l NONE_WITH_WARNINGS: Disables backup promotion, but logs a warning when backup promotion would normally occur.

l SKIP_RECOVERY_MODEL: Disables database recovery model change detection. Backup promotion as a result of recovery model change will not occur, but backup promotion in other scenarios will still occur.

l SKIP_RECOVERY_MODEL_WITH_WARNINGS: Enables database recovery model change detection, but if a recover model change is discovered, logs a warning instead of promoting the backup. Backup promotion in other scenarios will still occur.

13. To specify advanced backup options, use the Advanced options field to select or type advanced options.

Separate multiple entries with a comma, for example: BUFFERCOUNT=2, READ_WRITE_FILEGROUPS The following advanced backup options are supported:

l BUFFERCOUNT=number_of_IO_buffers: Specifies the total number of IO buffers that can be used during the backup operation.

l READ_WRITE_FILEGROUPS: Backs up only the read/write (active) filegroups within the database.

14. To start the backup operation, click Run.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 103

Monitor the backup operation After a backup operation is run from the Microsoft app agent for Application Direct SSMS plug-in, the Backup > Monitor page displays the backup script and status.

The following figure shows the backup information and status as it appears on the Monitor page.

Figure 15 Application Direct - Backup-Monitor page

Note: For information about the success or failure of the backup operation, review the log files that are located in the installation folder. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Back up SQL Server with the Application Direct backup command Use the ddbmsqlsv command to configure backups of Microsoft SQL Server data from a command prompt.

Note: In the syntaxes, the options that are enclosed in square brackets, that is, [ and ] are optional.

To perform specific backup-related and restore-related operations, the Microsoft application agent also supports the ddbmadmin.exe command besides the msagentadmin.exe command. However, the ddbmadmin.exe command is deprecated.

Backing Up SQL Server with Application Direct

104 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Syntax for backups of a stand-alone server

Run the ddbmsqlsv command with the following syntax to back up a stand-alone SQL Server:

ddbmsqlsv -c -l {full | incr | diff} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST= " -a "NSR_DFA_SI_DEVICE_PATH= " -a "NSR_DFA_SI_DD_USER= " [ ] " "

where:

-c

Specifies the SQL Server hostname that contains the SQL Server instance that you want to back up.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), or differential (diff). The default value is full.

-a "NSR_DFA_SI=TRUE"

Specifies that the backup is server-independent.

-a "NSR_DFA_SI_USE_DD=TRUE

Specifies that the backup destination is a Data Domain or PowerProtect X400 server

-a "NSR_DFA_SI_DD_HOST= "

Specifies whether the backup destination is a Data Domain or PowerProtect X400 server.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

Specifies the backup path. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To back up the entire instance, type MSSQL: n To back up specific databases, type [MSSQL:]

[[MSSQL:] [...]] For example: "MSSQL:database1" "MSSQL:database2"

l For a named instance, type the path in one of the following formats:

n To back up the entire instance, type MSSQL$ : n To back up specific databases, type MSSQL$ :

[...] For example: "MSSQL$SqlInst1:database1" "MSSQL$SqlInst1:database2"

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 105

Example 2 SQL stand-alone backup command

ddbmsqlsv.exe -c SQLX86.adesc.com -l full -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.196.90" -a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/sqlserver" "MSSQL$INST2008:d2"

Syntax for backups of an Always On availability group

Run the ddbmsqlsv command with the following syntax to back up a stand-alone SQL Server:

ddbmsqlsv -c -A -l {full | incr | diff} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST= " -a "NSR_DFA_SI_DEVICE_PATH= " -a "NSR_DFA_SI_DD_USER= " [ ] " "

where:

-c

Specifies the Windows cluster name that you want to back up.

-A

Specifies the fully qualified domain name (FQDN) of the SQL virtual server.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), or differential (diff). The default value is full.

-a "NSR_DFA_SI=TRUE"

Specifies that the backup is server-independent.

-a "NSR_DFA_SI_USE_DD=TRUE

Specifies that the backup destination is a Data Domain or PowerProtect X400 server

-a "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain or PowerProtect X400 server that contains the storage unit where you want to back up the databases.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

" "

Specifies the path to the objects that you want to back up. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To back up the entire instance, type MSSQL# :

Backing Up SQL Server with Application Direct

106 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

n To back up specific databases, type [MSSQL# :] [[MSSQL# :] [...]]

For example: For example: "MSSQL#aag1:database1" "MSSQL#aag1:database2"

l For a named instance, type the path in one of the following formats:

n To back up the entire instance, type MSSQL$ # : n To back up specific databases, type MSSQL

$ # : [...] For example: "MSSQL$SqlInst1#sql2012-aag3:database1" "MSSQL $SqlInst1#sql2012-aag3:database2"

Note: The Microsoft application agent does not support backing up multiple Always On availability groups in the same operation.

Example 3 SQL cluster backup command

The following command backs up databases in a SQL cluster environment:

ddbmsqlsv.exe -c SQLcluster1.adesc.com -A SQLcluster1.adesc.com -l full -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.196.90" -a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/sqlserver" "MSSQL$SQ12INST4#sql2012-aag3:"

Backing up an Always On availability group when all instance names are the same

When the server nodes contain only default instances, or when the SQL Server instance names are all the same in the availability group, type the backup command in the following syntax:

ddbmsqlsv.exe -c SQL2012clus3.brsvlab.local -S 4 -l full -y +30d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" "MSSQL$SQ12INST4#sql2012-aag3:"

where:

l -c SQL2012clus3.brsvlab.local specifies the cluster name.

l "MSSQL$SQ12INST4#sql2012-aag3:" is the backup object name, where all the databases of the sql2012-aag3 Always On availability group are backed up. The backup object name is made of the following components:

n MSSQL is a mandatory term.

n If you use named instances, $SQ12INST4 is the SQL Server instance name. If you use a default instance, do not specify $ in the backup object.

n # indicates a federated backup.

n sql2012-aag3 is the AlwaysOn Availability Group name.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 107

Backing up an Always On availability group when there are multiple instance names

When you back up an Always On availability group where the nodes contain SQL Servers with different instance names, the backup command on each instance should reflect the available instance.

For example, consider the following scenario:

l There are two different instances:

n SQ12INST4 resides on Node1.

n SQ12INST5 resides on Node2

l Node1 is the primary replica.

l Node2 is the secondary replica.

l The Always On availability group backup preference is set to secondary.

In this scenario, the backup command on SQL2INST4 should specify the backup object as "MSSQL $SQL2INST4#sql2012-aag3:", while backup command on SQL2INST5 should specify the backup object as "MSSQL$SQL2INST5#sql2012-aag3:". After failover of Node1 and Node2, Node1 becomes secondary, and Node2 becomes primary. The backup command is the same after failover.

Note: When browsing the backups for a restore operation, the save sets could be in either of the instances (SQL2INST4 or SQL2INST5). The save set depends on the instance that is used for the first backup.

Backing up multiple databases in an Always On availability group

To back up only certain databases in an Always On availability group, use " " " " " "... to specify the database names as the backup objects.

Type the backup command with the following syntax:

ddbmsqlsv.exe -c SQL2012clus3.brsvlab.local -S 4 -l full -y +30d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" "MSSQL$SQ12INST4#sql2012- aag3:database1" "MSSQL$SQ12INST4#sql2012-aag3:database3" "MSSQL $SQ12INST4#sql2012-aag3:database8"

where:

l MSSQL$SQ12INST4#sql2012-aag3:database1, MSSQL$SQ12INST4#sql2012- aag3:database3, and MSSQL$SQ12INST4#sql2012-aag3:database8 are the backup objects

l Only database1, database3, and database8 of the sql2012-aag3 Always On availability group are backed up.

Optional parameters for the ddbmsqlsv command

The following list describes the optional parameters that you can use with the ddbmsqlsv command:

-N

Specifies a name for the backup.

Backing Up SQL Server with Application Direct

108 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

-b

Specifies a description for the backup.

-S

Specifies to perform a striped backup using the number of stripes that you specify. If you specify a value greater than a maximum limit of 32, the value defaults to 32.

-a "SKIP_SIMPLE_DATABASE={TRUE | FALSE}"

Specifies whether to ignore backing up SIMPLE recovery model databases. Use this option if you select the SIMPLE recovery model databases for backup, and specify Transaction log as the backup type. The SIMPLE recovery model databases do not support transaction log backups. The default value is FALSE.

-a "NSR_SKIP_NON_BACKUPABLE_STATE_DB={TRUE | FALSE}"

Specifies whether to check the status of the selected databases and ignore the databases that are unready or unavailable for the backup. If the status of the databases is ONLINE, the databases are ready or available for backups. If the status of the databases is OFFLINE, EMERGENCY (SINGLE_USER Mode), SUSPECT, RESTORING, RECOVERING, or RECOVERY_PENDING, the databases are not ready or available for backups. The default value is TRUE.

-q

Displays ddbmsqlsv messages in the quiet mode, that is, the option displays summary information and error messages only.

-v

Displays ddbmsqlsv messages in the verbose mode, that is, the option provides detailed information about the progress of the backup operation.

-G

Specifies to perform a NO_LOG transaction log backup before backing up the database.

-R

Uses the NO_TRUNCATE option when backing up transaction logs.

-T

Performs a TRUNCATE_ONLY transaction log backup before backing up the database.

-k

Specifies to perform a checksum before backing up the data to the device.

-u

Specifies to perform a checksum before the backup but to proceed with the backup operation even in the case of errors.

-y + { d | w | m | y}

Specifies the period of time after which the backup must expire. For example:

-y +20d

You can specify any positive integer, followed by one of the following units of time:

l d for day

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 109

l w for week

l m for month

l y for year

The maximum possible retention date is 2/7/2106. If you omit this option or specify 0, the default value of 30 days is used.

-h " "

Specifies databases to omit from the backup. You can use this option to specify exact database names or use wildcard characters. Two wildcard characters are supported:

l Question mark (?): Matches any single character

l Asterisk (*): Matches zero to unlimited characters When you use wildcard characters you must enclose the database name in square brackets, for example, [DB?].

For example, consider the following scenarios:

l To exclude only DB_1 and DB_2 from the backup, add -h DB_1 -h DB_2 to the backup command.

l To exclude all databases named with the format of DB_x, such as DB_9 and DB_a, add -h [DB_?] to the backup command.

l To exclude all databases with names ending in DB, add -h [*DB] to the backup command.

-O {BUFFERCOUNT | READ_WRITE_FILEGROUPS}

Specifies advanced backup options. You can specify the following advanced backup options:

l BUFFERCOUNT= : Specifies the total number of IO buffers that can be used during a backup operation.

l READ_WRITE_FILEGROUPS: Specifies to back up only the read/write (active) filegroups within the database.

If you are specifying multiple options, separate each argument with a comma. The syntax is as follows:

-O "Option1, Option2, Option3"

-D

Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0 (zero).

-a "DELETE_DEBUG_LOG_DAYS= "

Specifies to delete debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

-a "NSR_COPY_ONLY={TRUE | FALSE}"

Performs a copy-only backup from a SQL Server. The copy-only backups do not disturb the SQL Server backup chain and do not affect backup-level promotion and log truncation. The default value is FALSE.

Backing Up SQL Server with Application Direct

110 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

This option applies only if you specify either full or incr as the backup type with the -l parameter. Copy-only transaction log backups are generally required only to perform online restores.

-a "NSR_ENABLE_FC={TRUE | FALSE}"

Enables or disables backing up the databases to the Data Domain server through Fibre Channel. The default value is FALSE.

-a "NSR_FC_HOSTNAME=

Specifies the hostname of the Fibre Channel. Use this option with the -a "NSR_ENABLE_FC=TRUE" parameter.

-a "NSR_INCLUDE_AAG_DATABASE=None

Specifies to omit Always On availability group databases from an instance-level backup operation.

-a "NSR_DFA_SI_DD_LOCKBOX_PATH= "

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to lockbox path in the default installation path, which is C:\Program Files\DPSAPPS\common\lockbox.

-a "SKIP_SYSTEM_DATABASE={TRUE | FALSE}"

Specifies whether to skip the system databases during instance-level transaction log backups. The default value is FALSE.

-a "BACKUP_PROMOTION={ALL | NONE | NONE_WITH_WARNINGS | SKIP_RECOVERY_MODEL | SKIP_RECOVERY_MODEL_WITH_WARNINGS}"

Specifies backup promotion options. The following values are valid:

l ALL (Default): Enables backup promotion to occur in any applicable scenario.

l NONE: Disables all backup promotion.

l NONE_WITH_WARNINGS: Disables backup promotion, but logs a warning when backup promotion would normally occur.

l SKIP_RECOVERY_MODEL: Disables database recovery model change detection. Backup promotion as a result of recovery model change will not occur, but backup promotion in other scenarios will still occur.

l SKIP_RECOVERY_MODEL_WITH_WARNINGS: Enables database recovery model change detection, but if a recover model change is discovered, logs a warning instead of promoting the backup. Backup promotion in other scenarios will still occur.

The setting specified with this option applies to every database in the SQL instance when this setting is specified along with an SQL instance level backup path. Similarly, the setting specified with this option applies only to specified databases when this setting is specified with a database level backup path.

Perform backups with T-SQL scripts The Microsoft application agent for Application Direct enables you to generate a SQL-CLR script that you can use to back up SQL Server.

The SQL-CLR backup command, emc_run_backup, uses the Microsoft application agent for Application Direct with SQL Server backup command prompt options. You must also provide VARCHAR parameters to this command.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 111

To use this command, you must have a detailed knowledge of the Microsoft application agent for Application Direct with SQL Server backup command prompt options. Back up SQL Server with the Application Direct backup command on page 104 provides information about the Microsoft application agent for Application Direct with SQL Server backup command prompt options.

Sample T-SQL backup script

The following SQL-CLR script is an example of a backup script:

USE [master] GO DECLARE @returnCode int 8 -l full -N "Set1" -y +0d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.192.10" -a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/ddsub7" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" "MSSQL:"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

You can use any SQL Server standard interfaces, such as the SSMS Query window and OSQL command line tool, to run the SQL-CLR scripts.

You can use the SQL-CLR script to schedule SQL Server backups by using the SQL Server Agent. Scheduling SQL Server backups by using SQL Server Agent on page 89 provides information.

Best practices to back up SQL Server with Application Direct on page 87 provides guidelines for better performance of SQL Server backups by using the Microsoft application agent for Application Direct SQL-CLR scripts.

Performing SQL Server push backups by using the Microsoft application agent for Application Direct T-SQL scripts

About this task

To back up either all databases or only the specific databases of a SQL Server instance from a source host to a Data Domain or PowerProtect X400 device by using a different host, perform the following steps:

Procedure

1. Start SSMS on a different host that you use to perform the backup.

2. Connect to the source SQL Server instance on the source host.

3. In the SSMS window on the different host, click New Query.

4. In the New Query window, run the T-SQL script to perform the backup.

Results

You can either generate the T-SQL script by using the Microsoft application agent GUI on the source host and copy it to the New Query window on the different host or write the T-SQL script in the New Query window. Perform backups with the Microsoft app agent for Application Direct SSMS plug-in on page 97 and Perform backups with T-SQL scripts on page 111 provide information.

Example 4 T-SQL push backup script

Backing Up SQL Server with Application Direct

112 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Example 4 T-SQL push backup script (continued)

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_backup ' -c CLUST-SQL-02.contoso.com -A CLUST-SQL-02.contoso.com -l full -y +0d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=nmmddtwo.sp2010.com" - a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/ddbmav2b75" - a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" "MSSQL$Inst1:Clus-SQL-01- DB01" "MSSQL$Inst1:CLUST-SQL-02-DB01" "MSSQL$Inst1:CLUST-SQL-02-DB02" "MSSQL $Inst1:CLUST-SQL-02-DB03"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

where:

l CLUST-SQL-02.contoso.com is the source host that has the source SQL Server instance that you want to back up.

l Inst1 is the source SQL Server instance, to which you must connect from the different host to perform the backup.

l Clus-SQL-01-DB01, CLUST-SQL-02-DB01, CLUST-SQL-02-DB02, and CLUST- SQL-02-DB03 are the databases that you have selected in the Inst1 instance to back up.

Performing federated backups of SQL Always On availability group databases by using T-SQL scripts

To perform federated backups, use the same backup command and options that Perform backups with T-SQL scripts on page 111 describes, but with the following modifications:

l Specify the Windows cluster name for in - c .

l Specify the backup object name for in -N .

l Specify # in the backup object name.

The options in the following sample scripts indicate these modifications.

Note: The Microsoft application agent does not support backing up multiple Always On availability groups in the same operation.

Example 5 Sample T-SQL script to back up an entire Always On availability group

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_backup '-c

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 113

Example 5 Sample T-SQL script to back up an entire Always On availability group (continued)

SQL2012clus3.brsvlab.local - S 4 -l full -y +30d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" - a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" -N "MSSQL$SQ12INST4#sql2012- aag3:" "MSSQL$SQ12INST4#sql2012-aag3:"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Example 6 Sample T-SQL script to back up multiple databases (a subset of databases) of an Always On availability group

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_backup '-c SQL2012clus3.brsvlab.local - S 4 -l full -y +30d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" - a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" -N "MSSQL$SQ12INST4#sql2012- aag3:DB" "MSSQL$SQ12INST4#sql2012-aag3:database1" "MSSQL $SQ12INST4#sql2012-aag3:database3" "MSSQL$SQ12INST4#sql2012- aag3:database8"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Example 7 Sample T-SQL script to back up a specific database of an Always On availability group

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_backup '-c SQL2012clus3.brsvlab.local - S 4 -l full -y +30d -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" - a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -a "NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" -N "MSSQL$SQ12INST4#sql2012- aag3:database1" "MSSQL$SQ12INST4#sql2012-aag3:database1"' IF @returnCode <> 0 BEGIN

Backing Up SQL Server with Application Direct

114 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Example 7 Sample T-SQL script to back up a specific database of an Always On availability group (continued)

RAISERROR ('Fail!', 16, 1) END

Listing backups List the backups performed to a Data Domain or PowerProtect X400 system by using either the msagentadmin administration command or the ddbmexptool command.

List backups and save files with the msagentadmin administration command The Microsoft application agent supports list commands to view backups and save files.

List backups or save files using the msagentadmin administration command with the following syntax:

msagentadmin administration {--list | --listfiles} --ddhost " " -- ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" --appID "mssql" [ ]

where:

{--list | --listfiles}

Specifies the type of list operation. You must only specify one of the following parameters:

l --listfiles specifies to list save files on the storage unit.

l --list specifies to list backups. You can use the -s alias for the list parameter.

--ddhost " "

Specifies the name of the server that contains the storage unit, to which you backed up the databases.

--ddpath "/ "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

--appID "mssql"

Specifies the application ID (namespace) to locate backups. Specify mssql for SQL Server. You can use the -n alias for the --appID parameter.

Optional parameters for the msagentadmin administration command

The following list describes the optional parameters you can use with msagentadmin administration commands.

--config " "

Specifies the full path to the configuration file.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 115

You can use the -z alias for the --config parameter.

--lockbox

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

--tier

Specifies to display the location of the save sets in either the Data Domain system (active tier) or the Data Domain Cloud Tier.

--client

Specifies the application server hostname that contains the server instance that was backed up. You can use the -c alias for the --client parameter.

--before

Lists only the backups that were taken on or before the given date and time, date, day, or time. If you do not specify a value, the value defaults to the current date and time. For example, now, 3/31/2016 15:00:00, or Tuesday. You can use the -e alias for the --before parameter.

--after

Lists only the backups that were taken on or after the date and time, date, day, or time. For example: 3/31/2016 15:00:00 or Tuesday. You can use the -b alias for the --after parameter.

--limit

Specifies to limit the list results to the specified number.

--debug

Specifies the debug level for listing backups. The default value is 0 (zero). You can use the -D alias for the --debug parameter.

--deleteDebugLog

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs

--help

Prints a brief help message. You can use the -h alias for the --help parameter.

--confirm

Specifies to skip the user confirmation prompts for the operation.

-a " "

Specifies the keyword and value of an option that is also specified in the configuration file. For example, -a "CLIENT= ".

Backing Up SQL Server with Application Direct

116 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Examples of the msagentadmin list command Consider the following examples of the msagentadmin administration list commands.

Example 8 List all backups

The following command lists all the backups:

msagentadmin administration --list --ddhost datadomain.myapp.com -- ddpath "/dd/backups" --dduser "dduser" --appid msapp_bbb -e -- client myserver.myapp.com

Example 9 List all files in a storage unit

The following command lists all files in the /dd/backups storage unit:

msagentadmin administration --listFiles --ddhost datadomain.myapp.com --ddpath "/dd/backups" --dduser "dduser" -- appid msapp_bbb --client myserver.myapp.com

Example 10 Limit the list results to a certain number

The following command lists the five most recent backups:

msagentadmin administration --list --ddhost datadomain.myapp.com -- ddpath "/dd/backups" --dduser "dduser" --appid msapp_bbb --client myserver.myapp.com --limit 5

Example 11 Limit the list results to a certain date

The following command lists the backups that are performed after March 30, 2017:

msagentadmin administration --list --ddhost datadomain.myapp.com -- ddpath "/dd/backups" --dduser "dduser" --client myserver.myapp.com --appid msapp_bbb --after '3/30/2017'

Example 12 Limit the list results to a day of this week

The following command lists the backups that were performed before this Tuesday:

msagentadmin administration --list --ddhost datadomain.myapp.com -- ddpath "/dd/backups" --dduser "dduser" --appid msapp_bbb --client myserver.myapp.com --before Tuesday

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 117

List backups with the Application Direct expiry tool About this task

Run the following command to list backups:

ddbmexptool -l -n MSSQL -a "DDBOOST_USER= " -a "DEVICE_PATH= " -a "DEVICE_HOST= " -a "CLIENT= " [ ]

where:

-l

Specifies to list backups.

-n MSSQL

Specifies to list SQL Server application save sets.

-a "DEVICE_HOST= "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

-a "DEVICE_PATH= "

Specifies the name and the path of the storage unit, to which you backed up the databases.

a "DDBOOST_USER= "

Specifies the username of the DD Boost user.

-a "CLIENT= "

Specifies the SQL Server hostname that was specified for the backup.

Note: Specify the -b and -e parameters to limit the output to backups within a set time range.

Consider the following examples of the ddbmexptool list command:

l The following command lists all backups:

ddbmexptool.exe -l -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=aru42" - a "DEVICE_HOST=10.31.194.120" -a "CLIENT=hmytest2.contoso.com"

l The following command lists all the save sets with the name MSSQL$DEST2008:testdb1:

ddbmexptool.exe -l -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=msappstu7" -a "DEVICE_HOST=10.31.140.205" -a "CLIENT=vclus33.joy.com" -N MSSQL$DEST2008:testdb1

l The following command uses a configuration file:

ddbmexptool.exe -l -z -n mssql C:\DD-Config-Details.txt

Results

The expiry tool lists save sets in ascending order by default, showing the oldest save sets first. To list save sets in descending order, showing the most recent save sets first, specify LIST_SAVESET_DESC=TRUE in the configuration file, then use the -a LIST_SAVESET_DESC=TRUE option with the ddbmexptool command.

Backing Up SQL Server with Application Direct

118 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Optional parameters for the ddbmexptool expiry tool

The following list describes the optional parameters for the ddbmexptool expiry tool.

-v

Displays the verbose output on the console.

-D

Generates detailed logs that you can use to troubleshoot the backup issues. The default value is 0 (zero).

-p

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

-b

Specifies the lower boundary of the save time of the backup. Specify the time in either the


: :
, format or the relative time format. The supported relative time formats are now, days ago, months ago, years ago, and days.

If you do not specify the -b option, the command considers 1/1/1970 as the lower boundary.

-e

Specifies the upper boundary of the save time of the backup. Specify the time in either the


: :
, format or the relative time format. The supported relative time formats are now, days ago, months ago, years ago, and days.

If you do not specify the-e option, the command considers the current time as the upper boundary.

The best practice is to set the value of -e to the same value as the expiration policy time period that was specified at the backup time.

-N

Specifies a particular save set name to either display or display and delete. For example, -N MARS$DEST2008:testdb1.

-z

Specifies the full path to the configuration file.

-a "parameter=value"

Specifies a key-value pair, that is, -a "key = value" for options present in the configuration file. For example, -a "DEVICE_HOST = bu-ddb890.lss.emc.com"

-Y

Specifies to skip the user confirmation prompt when deleting backups.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 119

Move and recall save sets on a Data Domain Cloud Tier The Microsoft application agent supports management of data with a Data Domain Cloud Tier.

Note: Configuring the Data Domain Cloud Tier for data movement to the cloud on page 34 describes how to configure a DD Cloud Tier data movement policy.

Use the msagentadmin.exe administration command to perform the following tasks:

l Mark save sets to move them from a Data Domain storage unit to a Data Domain Cloud Tier.

l Recall save sets from a Data Domain Cloud Tier to a Data Domain storage unit. The Microsoft application agent supports the following types of recall:

n Seamless or automatic: When a restore operation needs the save sets that are present on a Data Domain Cloud Tier, the Microsoft application agent automatically recalls the save sets to the active tier on Data Domain. However, when you use Elastic Cloud Storage (ECS) with DD OS 6.1 or later, the Microsoft application agent restores the save sets on the cloud tier device directly from ECS to the client without recalling to the active tier. The Data Domain documentation provides more details and recommendations for restore operations directly from ECS.

n Manual: When both of the following conditions exist, recall the save sets manually before you perform a restore operation:

When a restore operation needs the save sets that are present on a Data Domain Cloud Tier.

When you do not want the Microsoft application agent to automatically recall and restore the save sets.

Move save sets to the Data Domain Cloud Tier Use the --move or -m flag with the msagentadmin administration command to move save sets to a Data Domain Cloud Tier.

To move save sets to a Data Domain Cloud Tier, type the following command:

msagentadmin.exe administration --move --ddhost "<server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" [--tier] [-- client <client_name>] [--after <start_time>] --before <end_time> --appID <application_ID> --config <config_file_path> [--debug <debug_level_1_through_9>]

NOTICE When you subsequently mark save sets, ensure that you do not mark the previously marked save sets by using the --after and --before options. If you mark the previously marked save sets, it can impact the performance of the data movement.

Consider the following example commands to mark SQL Server save sets to move them from a Data Domain storage unit to a Data Domain Cloud Tier:

Example 13 Cloud tier move command without a configuration file

Backing Up SQL Server with Application Direct

120 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Example 13 Cloud tier move command without a configuration file (continued)

msagentadmin administration --move --tier --before "30 days ago" -- appID mssql --ddhost "10.70.102.111" --ddpath "/mt1" --dduser "ost" --client SQLX86.adesc.com --debug 9

Example 14 Cloud tier move command with a configuration file

msagentadmin.exe administration --move --tier --before "30 days ago" --appID mssql --config c:\temp\config_pp.txt --debug 9

Recall save sets from the Data Domain Cloud Tier Use the --recall or -r flag with the msagentadmin administration command to recall save sets from a Data Domain Cloud Tier.

To recall save sets from the Data Domain Cloud Tier device to the Data Domain storage unit, type the following command:

msagentadmin.exe administration --recall --ddhost "<server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" [--tier] [-- client <client_name>] [--after <start_time>] --before <end_time> --appID <application_ID> --config <config_file_path> [--debug <debug_level_1_through_9>]

Consider the following example commands to mark SQL Server save sets to move them from a Data Domain storage unit to a Data Domain Cloud Tier:

Example 15 Cloud tier recall command without a configuration file

msagentadmin administration --recall --tier --after 1481104962 -- before 1481105533 --appID mssql --ddhost "10.70.102.111" --ddpath "/ mt1" --dduser "ost" --client SQLX86.adesc.com --debug 9

Example 16 Cloud tier recall command with a configuration file

msagentadmin.exe administration --recall --tier --after 1481104962 --before 1481105533 --appID mssql --config c:\temp\config_pp.txt -- debug 9

Optional parameters for the msagentadmin administration command The following list describes the optional parameters you can use with msagentadmin administration commands.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 121

--config " "

Specifies the full path to the configuration file. You can use the -z alias for the --config parameter.

--lockbox

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

--tier

Specifies to display the location of the save sets in either the Data Domain system (active tier) or the Data Domain Cloud Tier.

--client

Specifies the application server hostname that contains the server instance that was backed up. You can use the -c alias for the --client parameter.

--before

Lists only the backups that were taken on or before the given date and time, date, day, or time. If you do not specify a value, the value defaults to the current date and time. For example, now, 3/31/2016 15:00:00, or Tuesday. You can use the -e alias for the --before parameter.

--after

Lists only the backups that were taken on or after the date and time, date, day, or time. For example: 3/31/2016 15:00:00 or Tuesday. You can use the -b alias for the --after parameter.

--limit

Specifies to limit the list results to the specified number.

--debug

Specifies the debug level for listing backups. The default value is 0 (zero). You can use the -D alias for the --debug parameter.

--deleteDebugLog

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs

--help

Prints a brief help message. You can use the -h alias for the --help parameter.

--confirm

Specifies to skip the user confirmation prompts for the operation.

-a " "

Backing Up SQL Server with Application Direct

122 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the keyword and value of an option that is also specified in the configuration file. For example, -a "CLIENT= ".

Deleting backups Delete backups using either the msagentadmin administration command or the ddbmexptool command.

Delete backups with the msagentadmin administration command The Microsoft application agent supports the msagentadmin administration command to delete backups and save sets. The command first lists the backups, and then deletes them.

Note: When backup copies on a Data Domain or PowerProtect X400 system are managed through the PowerProtect Data Manager protection policy schedule, the expired backup copies are deleted according to the schedule. These backup copies must not be deleted through the msagentadmin administration command.

If you try to use the command to delete the backup copies that are managed by PowerProtect Data Manager, an error message appears.

To delete save sets or backups, run the msagentadmin administration command with the following syntax:

msagentadmin administration --delete --ddhost " " --ddpath "/ " --dduser " " --appID "mssql"

where:

--delete

Specifies a delete operation.

--ddhost " "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

--ddpath "/ "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

--appID "mssql"

Specifies the application ID (namespace) to locate backups. Specify mssql for SQL Server. You can use the -n alias for the --appID parameter.

Optional parameters for the msagentadmin administration command

The following list describes the optional parameters you can use with msagentadmin administration commands.

--config " "

Specifies the full path to the configuration file. You can use the -z alias for the --config parameter.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 123

--lockbox

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

--tier

Specifies to display the location of the save sets in either the Data Domain system (active tier) or the Data Domain Cloud Tier.

--client

Specifies the application server hostname that contains the server instance that was backed up. You can use the -c alias for the --client parameter.

--before

Lists only the backups that were taken on or before the given date and time, date, day, or time. If you do not specify a value, the value defaults to the current date and time. For example, now, 3/31/2016 15:00:00, or Tuesday. You can use the -e alias for the --before parameter.

--after

Lists only the backups that were taken on or after the date and time, date, day, or time. For example: 3/31/2016 15:00:00 or Tuesday. You can use the -b alias for the --after parameter.

--limit

Specifies to limit the list results to the specified number.

--debug

Specifies the debug level for listing backups. The default value is 0 (zero). You can use the -D alias for the --debug parameter.

--deleteDebugLog

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs

--help

Prints a brief help message. You can use the -h alias for the --help parameter.

--confirm

Specifies to skip the user confirmation prompts for the operation.

-a " "

Specifies the keyword and value of an option that is also specified in the configuration file. For example, -a "CLIENT= ".

Backing Up SQL Server with Application Direct

124 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Example of the msagentadmin delete command Consider the following example of the msagentadmin administration delete command.

Example 17 Delete backups taken before a specified date and time

The following command deletes all backups that were taken before 1461267170:

msagentadmin administration --delete --appid msapp_bbb --config C:\Program Files\DPSAPPS\MSAPPAGENT\config\msappagent.cfg --before 1461267170

Delete backups with the ddbmexptool expiry tool The Microsoft application agent provides the ddbmexptool expiry tool to delete expired or non- expired SQL Server backups.

Prerequisites

Ensure that you meet the following requirements before you delete the expired backups by using the expiry tool:

l You have a log of the backups that you performed.

l You have manually checked whether the expired backup that you want to delete has dependent non-expired backups.

Note: You must not delete an expired backup if it has dependent non-expired backups. The expiry tool does not check for the dependent backups.

l You have created a configuration file.

For example, create the C:\ddconfig.cfg configuration file with the following contents:

DEVICE_PATH=/artitest DDBOOST_USER=ost DEVICE_HOST=10.31.192.10 CLIENT=mw2k8x64sql2.nmmdev.com DEBUG_LEVEL=0 LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox"

Note: For the DEVICE_HOST variable, specify either the same hostname or the same IP address that you specified in the DataDomain Server field when you added or configured the Data Domain server. The hostname must be in the FQDN format. For example, test1.contoso.com.

Delete backups with the Application Direct expiry tool

About this task

Note: When backup copies on a Data Domain or PowerProtect X400 system are managed through the PowerProtect Data Manager protection policy schedule, the expired backup copies are deleted according to the schedule. These backup copies must not be deleted through the Application Direct expiry tool.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 125

If you try to use the Application Direct expiry tool to delete the backup copies that are managed by PowerProtect Data Manager, an error message appears.

On a Data Domain system, to delete the backups and the metadata files that are within a specific save time range and regardless of the expiry date, run the following command:

ddbmexptool -d -n MSSQL -a "DDBOOST_USER= " -a "DEVICE_PATH= " -a "DEVICE_HOST= " -a "CLIENT= " [ ]

where:

-d

Specifies to delete backups.

-n MSSQL

Specifies to delete SQL Server application save sets.

-a "DEVICE_HOST= "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

-a "DEVICE_PATH= "

Specifies the name and the path of the storage unit, to which you backed up the databases.

a "DDBOOST_USER= "

Specifies the username of the DD Boost user.

-a "CLIENT= "

Specifies the SQL Server hostname that was specified for the backup.

Note: Consider the following information:

l The deletion commands do not check for the dependencies of the backups to delete.

l If you do not specify the -b and -e options, the command deletes all the backups.

l To delete the backups that have been taken since yesterday, you must use the interactive mode.

l When you use the non-interactive mode (-Y option), set the value of the -e option to a minimum of 1 days ago to prevent the accidental deletion of the active backups.

Consider the following examples of the ddbmexptool delete command:

l The following commands delete all backups:

ddbmexptool.exe -d -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=aru42" - a "DEVICE_HOST=10.31.194.120" -a "CLIENT=hmytest2.contoso.com"

ddbmexptool.exe -d -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=msappstu7" -a "DEVICE_HOST=10.31.140.205" -a "CLIENT=vclus33.joy.com"

l The following command uses a configuration file:

ddbmexptool.exe -z -n mssql C:\DD-Config-Details.txt

Backing Up SQL Server with Application Direct

126 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Delete expired backups with the Application Direct expiry tool

About this task

To delete expired backups, run the following command:

ddbmexptool -k -n MSSQL -a "DDBOOST_USER= " -a "DEVICE_PATH= " -a "DEVICE_HOST= " -a "CLIENT= " [ ]

where:

-k

Specifies to delete expired backups.

-n MSSQL

Specifies to delete SQL Server application save sets.

-a "DEVICE_HOST= "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

-a "DEVICE_PATH= "

Specifies the name and the path of the storage unit, to which you backed up the databases.

a "DDBOOST_USER= "

Specifies the username of the DD Boost user.

-a "CLIENT= "

Specifies the SQL Server hostname that was specified for the backup.

Note: If you do not specify the -b and -e options, the command deletes all the expired backups. However, the command does not delete the metadata files that the Microsoft application agent creates during backups. The size of the metadata files is negligible, and does not affect the performance of the host. To delete the metadata files, use the -d option.

Consider the following examples of the ddbmexptool delete command:

l The following command deletes all expired backups:

ddbmexptool.exe -k -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=aru42" - a "DEVICE_HOST=10.31.194.120" -a "CLIENT=hmytest2.contoso.com"

l The following command deletes all the expired save sets with the name MSSQL $DEST2008:testdb1:

ddbmexptool.exe -k -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=msappstu7" -a "DEVICE_HOST=10.31.140.205" -a "CLIENT=vclus33.joy.com" -N MSSQL$DEST2008:testdb1

l The following command uses a configuration file:

ddbmexptool.exe -k -n mssql -z C:\DD-Config-Details.txt

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 127

Delete expired backups by running the expiry tool with T-SQL

With the Microsoft application agent, the CLR deployment tool includes the dbo.emc_run_delete stored procedure, which enables you to run the expiry tool from a regular SQL Server Management Studio GUI.

The stored procedure runs the expiry tool, and uses the command line arguments that are passed into the stored procedure.

The stored procedure also ensures that the delete command includes -Y and the -n mssql options.

The expiry tool requires the -Y and the -n mssql options because you cannot intervene, and the Microsoft application agent supports only the MSSQL plug-in through the T-SQL interface.

Sample T-SQL command to view the backups

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_delete ' -b "2 weeks ago" -e "one week ago" -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=aru42" -a "DEVICE_HOST=10.31.194.120" -a "CLIENT=hmytest2.contoso.com"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Sample T-SQL command to delete the backups

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_delete ' -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=aru42" -a "DEVICE_HOST=10.31.194.120" -a "CLIENT=hmytest2.contoso.com" -d -e "one day ago"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Sample T-SQL command to delete the expired backups

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_delete ' -n mssql -a "DDBOOST_USER=ost" -a "DEVICE_PATH=aru42" -a "DEVICE_HOST=10.31.194.120" -a "CLIENT=hmytest2.contoso.com" -k' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Optional parameters for the ddbmexptool expiry tool

The following list describes the optional parameters for the ddbmexptool expiry tool.

-v

Displays the verbose output on the console.

Backing Up SQL Server with Application Direct

128 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

-D

Generates detailed logs that you can use to troubleshoot the backup issues. The default value is 0 (zero).

-p

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

-b

Specifies the lower boundary of the save time of the backup. Specify the time in either the


: :
, format or the relative time format. The supported relative time formats are now, days ago, months ago, years ago, and days.

If you do not specify the -b option, the command considers 1/1/1970 as the lower boundary.

-e

Specifies the upper boundary of the save time of the backup. Specify the time in either the


: :
, format or the relative time format. The supported relative time formats are now, days ago, months ago, years ago, and days.

If you do not specify the-e option, the command considers the current time as the upper boundary.

The best practice is to set the value of -e to the same value as the expiration policy time period that was specified at the backup time.

-N

Specifies a particular save set name to either display or display and delete. For example, -N MARS$DEST2008:testdb1.

-z

Specifies the full path to the configuration file.

-a "parameter=value"

Specifies a key-value pair, that is, -a "key = value" for options present in the configuration file. For example, -a "DEVICE_HOST = bu-ddb890.lss.emc.com"

-Y

Specifies to skip the user confirmation prompt when deleting backups.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 129

Backing Up SQL Server with Application Direct

130 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 5

Backing Up SQL Server with Storage Direct

This chapter includes the following sections:

l Overview of SQL Server backups with Storage Direct......................................................... 132 l Storage Direct backup workflow.......................................................................................... 132 l Best practices to back up SQL Server with Storage Direct.................................................. 133 l RecoverPoint on XtremeIO backup considerations.............................................................. 134 l Naming conventions for backups with Storage Direct..........................................................135 l Backing up SQL Server with Storage Direct.........................................................................136 l List backups with the msagentadmin command................................................................... 148 l Deleting backups.................................................................................................................. 151

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 131

Overview of SQL Server backups with Storage Direct You can back up SQL Server by using the Microsoft application agent SSMS plug-in (GUI), Storage Direct commands, or T-SQL scripts.

Storage Direct backups are always performed at LUN-level.

Storage Direct backups do not use the Data Domain Distributed Segment Processing (DSP) for non-Gen0 backups. Storage Direct modifies the blocks that are deleted on the volumes, and considers them as new blocks.

Though these blocks are non-unique, a data transfer operation sends these blocks to Data Domain. Log truncation, where logs are deleted after a backup, is an example.

In the case of RecoverPoint, according to your consistency group layout, you can back up either all the databases or only the required databases of a SQL Server instance.

Include all the databases of the same consistency group in a backup. Regardless the databases that are included in the backup, the backup is always performed at the consistency group level. Back up all the databases of a consistency group.

Storage Direct backup workflow The backup workflow for Storage Direct is different depending on whether you are using a VMAX array or RecoverPoint appliance.

Storage Direct with RecoverPoint backup workflow The Storage Directwith RecoverPoint backup workflow includes the following steps:

1. The database administrator starts a Storage Direct with RecoverPoint backup by running the database native backup tool, and specifying the backup type.

2. The Microsoft application agent maps the files in the backup to a list of XtremIO source LUNs, obtains information about the relevant consistency groups from RecoverPoint, and checks whether the source LUNs can be protected by using Storage Direct with RecoverPoint.

3. The Microsoft application agent notifies the application or database that the files can be quiesced or placed in the hot backup mode.

4. The Microsoft application agent notifies RecoverPoint to create a point-in-time snapshot, that is a bookmark of the consistency groups that contain the source LUNs.

5. RecoverPoint creates a snapshot of all the required consistency groups on the XtremIO system.

6. The Microsoft application agent notifies the application or database that the files can be unquiesced or taken out of the backup mode, for a minimum impact on the application or the database.

7. RecoverPoint uses Application Direct to write all the blocks that are changed since the previous snapshot, to working files on the Data Domain system.

8. RecoverPoint uses the FastCopy service to create and store a Data Domain vdisk static image from each Application Direct working file. The vdisk static images form the permanent backup.

9. The database backup tool records the successful backup in its backup catalog.

10. The Microsoft application agent records the backup in its own catalog, in a predefined Application Direct storage unit on the Data Domain system.

Backing Up SQL Server with Storage Direct

132 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

11. The Microsoft application agent uses the Application Direct workflow to back up the files that Storage Direct cannot protect, to the Data Domain system, which provides full data protection.

Storage Direct with VMAX backup workflow The Storage Direct with VMAX backup workflow includes the following steps:

1. The DBA starts a Storage Direct backup by running the database native backup tool, and specifying the backup type.

2. The Microsoft application agent maps the files in the backup to a list of VMAX source devices (source LUNs), and checks whether the devices can be protected by using Storage Direct.

3. The Microsoft application agent notifies the application or database that the files can be quiesced or placed in the hot backup mode.

4. The Microsoft application agent creates a SnapVX snapshot on the VMAX array.

5. The Microsoft application agent notifies the application or database that the files can be unquiesced or taken out of the backup mode, for a minimum impact on the application or the database.

6. The VMAX array copies the changed data on each source LUN to a corresponding Data Domain vdisk device, which is a VMAX FAST.X encapsulated LUN.

7. For each Data Domain vdisk device, the Data Domain system creates a Data Domain vdisk static image, and stores it, which is a permanent backup.

8. The database backup tool records the successful backup in its backup catalog.

9. The Microsoft application agent records the backup in its own catalog, in a predefined Application Direct storage unit on the Data Domain system.

10. The Microsoft application agent uses the Application Direct workflow to back up the files that Storage Direct cannot protect, to the Data Domain system, which provides full data protection.

Best practices to back up SQL Server with Storage Direct The following are the best practices to back up SQL Server by using the Microsoft application agent for Storage Direct.

Install PowerPath

Install PowerPath on the host on which you want to use multipathing.

Use supported characters

The Microsoft application supports locale-specific date and time processing and setting the date and time display language can be set to non-English characters. However, database and path names must be written in ASCII characters only. Naming conventions for backups with Storage Direct on page 135 provides more information on supported characters for database and instance names.

Stop VSS when you stop VSS Storage Direct Hardware Provider

When you manually stop or restart VSS Storage Direct Hardware Provider, you must stop or restart Volume Shadow Copy also.

Use a single volume on each LUN for only one type of application server data

Use a single volume on the XtremIO and VMAX LUNs.

If a LUN contains multiple volumes, the volumes that are not included in the backup become only crash-consistent. Also, a rollback (LUN level) restore rolls back an image on the whole LUN. So, this setup or configuration does not support the rollback restore. The Microsoft application agent

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 133

does not know about the excluded volumes for the backup because there is no special safety check.

The XtremIO and VMAX LUNs must contain data for only one type of application server. For example, if you are using a LUN to back up SQL Server data, the same LUN cannot be used to protect Exchange Server data. If the LUNs contain data from more than one type of application server, the data that is not included in the backup becomes only crash-consistent.

Note: Do not perform or use nested mounts on volumes because Microsoft VSS does not support the feature.

Configure Data Domain quota limits

The Microsoft application agent does not have a parameter to control the total size that it consumes. The quota limits can only be set on the Data Domain system on a per-MTree (storage unit) basis.

An MTree's quota limits are calculated based on the logical size, which is the size before compression and de-duplication of the data.

The quota limits impact only backup operations.

Configuring usage limits of Data Domain resources on page 31 provides more information about quota limit, impact of exceeding the limits, and configuring the usage limits.

Configure usage limits for Data Domain streams

Configure a sufficient number of Data Domain streams for better performance of backups and restores. The streams control backup and restore parallelism for each database.

The Microsoft application agent requires one stream per save set that you back up or restore. When you perform striped backups, each stripe requires one stream. The stripes are concurrently executed for each database. Databases are sequentially backed up and restored. When you use stripes, the number of streams must be equal to or more than the number of stripes.

The minimum number of streams for a non-stripe environment is 1.

Configuring usage limits of Data Domain streams on page 33 provides more information about streams limit, impact of exceeding the limits, and configuring the usage limits.

RecoverPoint on XtremeIO backup considerations If you are using RecoverPoint on XtremeIO, review the following considerations.

Include consistency group LUNS in the backup

Ensure that all the LUNs of a consistency group participate in the backup by explicitly including them in the backup.

Otherwise, if you use a RecoverPoint version that is earlier than 5.0, any rollback restores of the backup fail.

Include consistency group databases in the backup

Include all the databases of a RecoverPoint consistency group in the backup.

Otherwise, the databases that are not included in the backup are not application-aware, and not recorded in the Microsoft application agent catalog.

Note: Performing a rollback restore of this backup can corrupt the databases that are not included in the backup.

Use a single backup invocation span

Minimize the number of consistency groups by using a single backup invocation span.

Backing Up SQL Server with Storage Direct

134 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Microsoft VSS requires a snapshot to be taken within 10 seconds. If the number of consistency groups increases, the snapshot time increases.

Naming conventions for backups with Storage Direct When naming SQL Server instance, database, and filegroups, consider that the Microsoft application agent does not distinguish the difference between upper and lowercase letters. The names are not case-sensitive.

Therefore, if there are two or more databases with the same name but with different capitalization, such as DB1 and db1, the Microsoft application agent views these databases as the same and by default backs up only one of the databases.

The following table described the special characters that are supported for naming database backups in SQL stand-alone, cluster, and Always On availability group configurations with Microsoft application agent for Storage Direct.

Note: Sometimes, these characters appear as URL-encoded in the command prompt.

Table 15 Supported special characters

Special character Name

` Grave accent

\t Tab

/ Slash

\ Backslash

" Double quote

, Comma

% Percentage

& Ampersand

< Less than

> Greater than

? Question mark

[ Open bracket

] Close bracket

^ Caret

{ Open curly bracket

} Close curly bracket

| Vertical bar

Note: While SQL Server supports naming instances with the hash symbol (#), the Microsoft application agent does not. If an instance includes a hash symbol, backups of that instance will fail.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 135

Backing up SQL Server with Storage Direct The Microsoft application agent for Storage Direct with SQL Server supports multiple tools to perform backups.

You can configure backups using the Microsoft application agent SQL Server Management Studio plug-in (GUI), Microsoft application agent for Storage Direct commands, or T-SQL scripts.

Note: Storage Direct with SQL Server backups are always VSS-based full backups.

Back up SQL Server with the Microsoft app agent for Storage Direct SSMS plug-in

The Microsoft application agent supports a user interface to perform backup operations through a SQL Server Management Studio (SSMS) plug-in.

About this task

The Script view is available in each page, which generates a command prompt equivalent script. You can use this script to create a .bat file to perform scheduled backups, automation, and other tasks.

l CLI Scripts: To generate the CLI script, which you can use to run a backup from the CLI.

l T-SQL Scripts: To generate a backup script in the T-SQL format. You can use the T-SQL scripts to restore SQL Server using the Microsoft application agent for Storage Direct.

Launch the Microsoft app agent for Storage Direct SSMS plug-in

To open the Microsoft app agent for Storage Direct SSMS plug-in, from the Windows desktop, click Start > Microsoft SQL Server Management Studio > Microsoft app agent for Storage Direct.

NOTICE If you have not installed SSMS, to start the Microsoft app agent for Storage Direct SSMS plug-in, run the DDSSMSAddinApp.exe pp command from the \DPSAPPS\MSAPPAGENT\bin folder.

Configure general backup settings To configure SQL backups with the Microsoft app agent for Storage Direct SSMS plug-in, you must first specify general backup options on the Backup > General page.

Procedure

1. Open the Microsoft app agent for Storage Direct window to the Backup > General page.

The General page appears as shown in the following figure.

Backing Up SQL Server with Storage Direct

136 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 16 Storage Direct - Backup-General page

2. In the SQL Server Instance field, select the name of the SQL Server instance that contains the databases that you want to back up.

Note: The Microsoft app agent for Storage Direct SSMS plug-in does not support backing up multiple SQL Server instances in the same operation. To back up multiple SQL Server instances, use either the command prompt or T-SQL.

3. From the databases table, you can select either the entire SQL Server instance, that is, all the databases by selecting the check box in the header row or only the required databases to back up.

Note: A RecoverPoint Consistency Groups column appears when you specify the RecoverPoint Management Server field on the Options page.

4. In the Backup type list, select the type of the backup that you want to perform, such as Full or Transaction log.

To perform hybrid backups, select Transaction log. A full backup must exist for transaction log backups to succeed.

5. To start the backup operation, click Run.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 137

Configure backup options When you configure SQL backups with the Microsoft app agent for Storage Direct SSMS plug-in, you can specify backup options on the Backup > Options page.

Procedure

1. From the left panel, click Options to specify optional backup settings.

The Options page appears as shown in the following figure.

Figure 17 Storage Direct - Backup-Options page

2. To select a Data Domain server to which the database will be backed up, perform the following action sequence:

a. Click . . . beside Data Domain.

The Data Domain Connection List & Lockbox Settings dialog box appears as shown in the following figure.

Backing Up SQL Server with Storage Direct

138 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 18 Data Domain connection list and lockbox settings

b. In the Lockbox Folder field, type the path to lockbox, and then click Refresh.

The default path to the lockbox is C:\Program Files\DPSAPPS\common\lockbox.

The DataDomain Connections list is refreshed.

c. In the DataDomain Connections table, select target Data Domain server for the backup.

d. (Optional) To add or remove Data Domain servers from the DataDomain Connections table, perform one of the following action sequences:

l To add a Data Domain server, perform the following steps:

a. Click Add. The Add Data Domain Server details dialog box appears as shown in the following figure.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 139

Figure 19 Storage Direct - Add Data Domain Server details

b. DataDomain Server: Specify the name of the Data Domain server, to which you want to back up the databases.

c. Communication Protocol: Select the medium such as, Ethernet or Fibre channel, through which you want to back up the databases to the Data Domain server. By default, Ethernet is selected.

d. FC Service Name: Specify the name of the Data Domain server as the fibre channel (FC) service name if you have selected Fibre Channel from the Communication Protocol list. For example, the following figure shows the FC service name.

Figure 20 Data Domain server name

e. In the User Name field, type the username of the DD Boost user.

f. In the Password field, type the password of the DD Boost user.

g. In the Storage Unit field, type the name of the storage unit, to which you want to back up the databases.

h. To add a different vdisk user than the DD Boost user, perform the following action sequence:

a. Select Add a separate vdisk user.

b. In the User Name field, type the username of the vdisk user.

c. In the Password field, type the password of the vdisk user.

d. Click OK.

Backing Up SQL Server with Storage Direct

140 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Note: DD Boost user credentials are verified before they are saved in the lockbox. Verification of the user credentials requires some time to complete.

l To remove a Data Domain server, select the server, and then click Remove.

l To add a SQL virtual server to either back up databases to SQL clustered instances or restore databases from SQL clustered instances, perform the following steps:

n Select Edit LockBox Settings.

n In the Enter Host Name field, type the FQDN of the SQL virtual server.

n Click OK.

Note: To either back up databases to SQL clustered instances or restore databases from SQL clustered instances by using the T-SQL integration, you must add FQDNs of SQL virtual servers to the lockbox.

l To remove a SQL virtual server, select the FQDN of the SQL virtual server from the Select Host Name list, and then click Remove.

The PersistedSettings.xml file in the lockbox folder contains the information about Data Domain servers. Adding a Data Domain server for the first time to a new lockbox creates the PersistedSettings.xml file. Adding or removing a Data Domain server to or from the lockbox updates the PersistedSettings.xml file.

3. To select a RecoverPoint appliance that you want to use to perform the backup, perform the following action sequence:

a. Click . . . beside Management Server.

The RecoverPoint Connection List & Lockbox Settings dialog box appears as shown in the following figure.

Figure 21 RecoverPoint connection list and lockbox settings

b. In the Lockbox Folder field, type the path to lockbox and click Refresh.

The default path to lockbox is C:\Program Files\DPSAPPS\common\lockbox.

The RecoverPoint Connections list is refreshed.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 141

c. In the RecoverPoint Connections table, select the target RecoverPoint appliance or vRPA for the backup.

d. (Optional) To add or remove a RecoverPoint appliance from the RecoverPoint Connections table, perform one of the following action sequences:

l To add a RecoverPoint appliance, perform the following steps:

a. Click Add. The Add RecoverPoint Server details dialog box appears as shown in the following figure.

Figure 22 Storage Direct - Add RecoverPoint Server details

b. In the RecoverPoint Management Host field, type the name of the RecoverPoint management host that you want to use to back up the databases.

c. In the User Name field, type the username of the RecoverPoint appliance.

d. In the Password field, type the password of the RecoverPoint appliance.

e. Click OK.

l To remove a RecoverPoint appliance from the RecoverPoint Connections table, select the appliance, and then click Remove.

l To add a SQL virtual server to either back up databases to SQL clustered instances or restore databases from SQL clustered instances, perform the following steps:

n Select Edit LockBox Settings.

n In the Enter Host Name field, type the FQDN of the SQL virtual server.

n Click Add.

Note: To either back up databases to SQL clustered instances or restore databases from SQL clustered instances by using the T-SQL integration, you must add FQDNs of SQL virtual servers to the lockbox.

l To remove a SQL virtual server from the lockbox, select the FQDN of the SQL virtual server from the Select Host Name list, and then click Remove.

Note: Do not specify a RecoverPoint appliance if you are using a VMAX array to perform backups.

4. To use the remote VMAX array when you are backing up SRDF/S protected volumes, select Perform an SRDF based backup.

Note: Do not specify this field if you use a RecoverPoint array to perform backups.

5. To generate detailed logs, which you can use to troubleshoot backup issues, specify a number between 1 and 9 in the Select a debug level field. The default value is 0 (zero).

Backing Up SQL Server with Storage Direct

142 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

6. To delete debug logs older than a certain number of days, in the Delete debug logs after field, specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

7. To back up an Always On availability group, perform the following action sequence:

a. Select Always-on Availability.

b. In the Cluster Name field, type the Windows cluster name of the Always-On Availability Group.

You can perform Always On availability group backups from either a primary node or a secondary node.

Selecting this option does not back up local databases. You can backup the local databases by using the local SQL Server hostname as in the case of a stand-alone host.

8. To start the backup operation, click Run.

Monitor the backup operation After a backup operation is run from the Microsoft app agent for Storage Direct SSMS plug-in, the Backup > Monitor page displays the backup script and status.

The following figure shows the backup information and status as it appears on the Monitor page.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 143

Figure 23 Storage Direct - Backup-Monitor page

Note: For information about the success or failure of the backup operation, review the log files that are located in the installation folder at \DPSAPPS\MSAPPAGENT\logs. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Back up SQL Server with the Storage Direct backup command To back up SQL Server databases, use the following command:

msagentsv.exe [ ]

In command syntax, the parameters enclosed in square brackets are optional.

Syntax for backups with a RecoverPoint appliance

Use the msagentsv.exe command with the following syntax for Storage Direct with RecoverPoint backup operations:

msagentsv.exe -c -l {full | incr | diff} -A "NSR_DFA_SI_DD_HOST= " -A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A

Backing Up SQL Server with Storage Direct

144 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

"RP_MGMT_HOST= " -A "RP_USER= " [ ]

where:

-c

Specifies the SQL Server hostname that contains the SQL Server instance that you want to back up.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), or differential (diff). The default value is full.

-a "NSR_DFA_SI_DD_HOST= "

Specifies whether the backup destination is a Data Domain server.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "RP_MGMT_HOST= "

Specifies the fully qualified hostname of the RecoverPoint Management host. You must register this hostname and the username in the lockbox so that the Microsoft application agent can retrieve the password for the user. For example, rp.my-host.com.

-A "RP_USER= "

Specifies the RecoverPoint username that the hardware provider uses while taking the LUN level snapshots. You must register this username and the hostname in the lockbox so that the Microsoft application agent can retrieve the password for this user. For example,recoverpoint-user.

Specifies the backup path. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To back up the entire instance, type APPLICATIONS:\SqlServerWriter \

n To back up specific databases, type APPLICATIONS:\SqlServerWriter \ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To back up the entire instance, type APPLICATIONS:\SqlServerWriter\ encoded_SQL_instance_name>

n To back up specific databases, type APPLICATIONS:\SqlServerWriter\ encoded_SQL_instance_name>\ \ [...]\ The is typically %5C

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 145

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Syntax for backups with a VMAX array

Use the msagentsv.exe command with the following syntax for Storage Direct with VMAX backup operations:

msagentsv.exe -c -l {full | incr | diff} -A "NSR_DFA_SI_DD_HOST= " -A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " [ ]

where:

-c

Specifies the SQL Server hostname that contains the SQL Server instance that you want to back up.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), or differential (diff). The default value is full.

-a "NSR_DFA_SI_DD_HOST= "

Specifies whether the backup destination is a Data Domain server.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

Specifies the backup path. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To back up the entire instance, type APPLICATIONS:\SqlServerWriter \

n To back up specific databases, type APPLICATIONS:\SqlServerWriter \ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To back up the entire instance, type APPLICATIONS:\SqlServerWriter\ encoded_SQL_instance_name>

n To back up specific databases, type APPLICATIONS:\SqlServerWriter\ encoded_SQL_instance_name>\ \ [...]\ The is typically %5C

Backing Up SQL Server with Storage Direct

146 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Optional parameters for the msagentsv.exe command

The following list describes the optional parameters that you can use with msagentsv.exe:

-A "NSR_DFA_SI_DD_LOCKBOX_PATH= "

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to lockbox path in the default installation path, which is C:\Program Files\DPSAPPS\common\lockbox.

-D

Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0 (zero).

-A "DELETE_DEBUG_LOG_DAYS= "

Specifies to delete debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

-A "DDVDISK_USER= "

Specifies the Data Domain vdisk user. Full credentials are retrieved from the lockbox to authenticate with the host.

-A "SYMM_SNAP_REMOTE=yes"

Specifies that the Storage Direct backup will use the remote VMAX array when backing up SRDF/S protected volumes. Do not use this option if you use a RecoverPoint appliance to perform backups.

Back up SQL Server with T-SQL scripts The Microsoft application agent for Storage Direct enables you to generate SQL-CLR script that you can use to back up SQL Server.

The SQL-CLR backup command is protectpoint_run_backup.

You must provide a VARCHAR type parameters to this command. The protectpoint_run_backup command uses the same command options as the msagentsv.exe command. Optional parameters for the msagentsv.exe command on page 147 provides information about the backup command prompt options for backing up SQL Server.

You can use any SQL Server standard interfaces such as, the SQL Server Management Studio Query window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL backup script

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.protectpoint_run_backup ' -c LCP1018.MSAppAgent.com -A

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 147

"NSR_DFA_SI_DD_HOST=ledmd035.lss.example.com" -A "NSR_DFA_SI_DD_USER=DD163_user" -A "NSR_DFA_SI_DEVICE_PATH=/SU_DD163" -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common \lockbox" -A "RP_MGMT_HOST=lcp0246.lss.example.com" -A "RP_USER=admin" APPLICATIONS:\SqlServerWriter\LCP1018%5CMSSQLSERVER1' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

List backups with the msagentadmin command List backups and files with the msagentadmin command.

To list backups, run the following command:

msagentadmin list --ddhost " " --ddpath "/ " --dduser " " --rphost " " --rppath " " --rpuser " " [--config <file name>] [ ]

where:

list

Specifies an operation to list backups. You can use the -s alias for the list parameter.

--ddhost " "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

--ddpath "/ "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

--rphost " "

Specifies the fully qualified hostname of the RecoverPoint Management host. You must register this hostname and the username in the lockbox so that the Microsoft application agent can retrieve the password for the user. Mandatory only for backups with a RecoverPoint appliance. For example: rp.my-host.com

--rppath " "

Specifies the full path to the RecoverPoint management host. Mandatory only for backups with a RecoverPoint appliance. For example: rp.my-host.com

--rpuser " "

Specifies the RecoverPoint username that the hardware provider uses while taking the LUN level snapshots. You must register this username and the hostname in the lockbox so that the Microsoft application agent can retrieve the password for this user. Mandatory only for backups with a RecoverPoint appliance. For example: recoverpoint-user

Backing Up SQL Server with Storage Direct

148 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

--config " "

(Optional) Specifies the full path to the configuration file. You can use the -z alias for the --config parameter.

Note: While it is recommended that you use the msagentadmin command with Storage Direct, the msagentadmin administration list command is also supported with Storage Direct. List backups and save files with the msagentadmin administration command on page 115 provides information on listing backups with msagentadmin admnistration.

Examples of the msagentadmin list command

Example 18 List all backups

msagentadmin list --ddhost datadomain.myapp.com --ddpath "/dd/ backups" --dduser "dduser" --client myserver.myapp.com

Example 19 List the five most recent backups

msagentadmin list --ddhost datadomain.myapp.com --ddpath "/dd/ backups" --dduser "dduser" --client myserver.myapp.com --limit 5

Example 20 List the backups that are performed after

msagentadmin list --ddhost datadomain.myapp.com --ddpath "/dd/ backups" --dduser "dduser" --client myserver.myapp.com --after '3/30/2016'

Example 21 List the backups that were performed before Tuesday

msagentadmin list --ddhost datadomain.myapp.com --ddpath "/dd/ backups" --dduser "dduser" --client myserver.myapp.com --before Tuesday

Optional parameters to list backups with the msagentadmin command The following list describes the optional parameters for the msagentadmin list command.

--client

Specifies the application server hostname that contains the server instance that was backed up. You can use the -c alias for the --client parameter.

--lockbox

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 149

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

--after

Lists only the backups that were taken on or after the date and time, date, day, or time. For example: 3/31/2016 15:00:00 or Tuesday. You can use the -b alias for the --after parameter.

--before

Lists only the backups that were taken on or before the given date and time, date, day, or time. If you do not specify a value, the value defaults to the current date and time. For example: 3/31/2016 15:00:00 or Tuesday. You can use the -e alias for the --before parameter.

--limit

Displays only the specified number of most recent backups. You can use the -l alias for the --limit parameter.

--deleteDebugLog

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

--debug

Specifies the debug level for listing backups. The default value is 0 (zero). You can use the -D alias for the --debug parameter.

--help

Prints a brief help message. You can use the -h alias for the --help parameter.

--format {text | msagentrc | keyvalue}

Specifies the format in which the output will be displayed. text: Displays output in a general and readable format. This is the default value. msagentrc: Lists individual databases in the format that you can directly input to the restore command, msagentrc. keyvalue: Lists the output in the keyword and value format that you can use in other programs.

Backing Up SQL Server with Storage Direct

150 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Deleting backups You can delete backups using the msagentadmin delete command or using T-SQL scripts.

Delete backups with the msagentadmin command The msagentadmin delete command first lists the backups, and then deletes the backups.

To delete backups, run the following command:

msagentadmin delete --ddhost " " --ddpath "/ " --dduser " " --rphost " " -- rppath " " --rpuser " " [--config <file name>] [ ]

where:

delete

Specifies an operation to delete backups. You can use the -d alias for the delete parameter.

--ddhost " "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

--ddpath "/ "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

--rphost " "

Specifies the fully qualified hostname of the RecoverPoint Management host. You must register this hostname and the username in the lockbox so that the Microsoft application agent can retrieve the password for the user. Mandatory only for backups with a RecoverPoint appliance. For example: rp.my-host.com

--rppath " "

Specifies the full path to the RecoverPoint management host. Mandatory only for backups with a RecoverPoint appliance. For example: rp.my-host.com

--rpuser " "

Specifies the RecoverPoint username that the hardware provider uses while taking the LUN level snapshots. You must register this username and the hostname in the lockbox so that the Microsoft application agent can retrieve the password for this user. Mandatory only for backups with a RecoverPoint appliance. For example: recoverpoint-user

--config " "

Specifies the full path to the configuration file. You can use the -z alias for the --config parameter.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 151

Note: While it is recommended that you use the msagentadmin command with Storage Direct, the msagentadmin admnistration list commands are also supported with Storage Direct. List backups and save files with the msagentadmin administration command on page 115 provides information on listing backups with msagentadmin admnistration.

Examples of the msagentadmin delete command

Example 22 Delete all the backups that were taken before 1461267170

msagentadmin delete --config c:\temp\config_pp.txt --before 1461267170

Example 23 Delete all SQL VSS level full backups

msagentadmin administration --delete --ddhost "10.31.78.56" -- dduser ddvdisk1 --ddpath "/yashovmax" --client "SQLPPVMAXAUTO.quack.com"

Example 24 Delete all SQL VDI transaction log backups

msagentadmin administration --delete --ddhost "10.31.78.56" -- dduser ddvdisk1 --ddpath "/yashovmax" --client "SQLPPVMAXAUTO.quack.com" -e now -n mssql

Optional parameters to delete backups with the msagentadmin command

The following table lists the optional parameters for the msagentadmin delete command.

--confirm

Specifies to skip the confirmation prompt when deleting backups. You can use the -Y alias for the --confirm parameter.

--client

Specifies the application server hostname that contains the server instance that was backed up. You can use the -c alias for the --client parameter.

--lockbox

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

--after

Lists only the backups that were taken on or after the date and time, date, day, or time. For example: 3/31/2016 15:00:00 or Tuesday.

Backing Up SQL Server with Storage Direct

152 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

You can use the -b alias for the --after parameter.

--before

Lists only the backups that were taken on or before the given date and time, date, day, or time. If you do not specify a value, the value defaults to the current date and time. For example: 3/31/2016 15:00:00 or Tuesday. You can use the -e alias for the --before parameter.

--limit

Displays only the specified number of most recent backups. You can use the -l alias for the --limit parameter.

--deleteDebugLog

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

--debug

Specifies the debug level for listing backups. The default value is 0 (zero). You can use the -D alias for the --debug parameter.

--help

Prints a brief help message. You can use the -h alias for the --help parameter.

--format {text | msagentrc | keyvalue}

Specifies the format in which the output will be displayed. text: Displays output in a general and readable format. This is the default value. msagentrc: Lists individual databases in the format that you can directly input to the restore command, msagentrc. keyvalue: Lists the output in the keyword and value format that you can use in other programs.

Delete backups using T-SQL scripts The Microsoft application agent for Storage Direct enables you to generate SQL-CLR script that you can use to delete SQL Server backups.

The SQL-CLR backup command is protectpoint_run_delete.

You can use any SQL Server standard interfaces such as, the SQL Server Management Studio Query window and T-SQL command prompt to run the SQL-CLR scripts.

Example 25 Sample T-SQL backup deletion script

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.protectpoint_run_delete 'delete --dduser "ddvdisk1" -a "DEVICE_PATH=yashovmax" -a "DEVICE_HOST=10.31.78.56" - a "CLIENT=SQLPPVMAXAUTO.mars.com"' IF @returnCode <> 0 BEGIN

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 153

Example 25 Sample T-SQL backup deletion script (continued)

RAISERROR ('Fail!', 16, 1) END

Backing Up SQL Server with Storage Direct

154 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

PART 3

Restoring SQL Server

This part includes the following chapters:

Chapter 6, "Restoring Application Direct Backups"

Chapter 7, "Restoring Storage Direct Backups"

Chapter 8, "Restoring Virtual Machine Backups with vProxy Engine"

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 155

Restoring SQL Server

156 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 6

Restoring Application Direct Backups

This chapter includes the following sections:

l Best practices to restore SQL Server with Application Direct..............................................158 l Restoring SQL Server databases ........................................................................................ 158 l Performing table-level recovery........................................................................................... 177 l Performing SQL Server disaster recovery............................................................................184

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 157

Best practices to restore SQL Server with Application Direct Consider the best practices to restore SQL Server using Application Direct.

Configure connection settings

Data Domain Boost and PowerProtect X400 devices do not distinguish among Transmission Control Protocol (TCP)/Internet Protocol (IP), Fibre Channel (FC), and LAN, WAN, and MAN network types. Data Domain Boost and PowerProtect X400 devices can successfully operate where packet loss is strictly 0% and latency is less than 20 ms.

Enable instant file initialization

For better restores, enable the instant file initialization feature on SQL Server. SQL Server's initialization procedure writes zeros to the portion of the disk that contains the data and the log files. Enabling the instant file initialization feature does not enable zeroing of the disk for the data files.

Configure usage limits for Data Domain streams

Configure a sufficient number of Data Domain streams for better performance of backups and restores. The streams control backup and restore parallelism for each database.

The Microsoft application agent requires one stream per save set that you back up or restore. When you perform striped backups, each stripe requires one stream. The stripes are concurrently executed for each database. Databases are sequentially backed up and restored. When you use stripes, the number of streams must be equal to or more than the number of stripes.

The minimum number of streams for a non-stripe environment is 1.

Configuring usage limits of Data Domain streams on page 33 provides more information about streams limit, impact of exceeding the limits, and configuring the usage limits.

Restoring SQL Server databases The Microsoft application agent for Application Direct with SQL Server supports multiple tools to recover databases.

You can recover databases using the Microsoft application agent SQL Server Management Studio plug-in (GUI), Microsoft application agent for Application Direct commands, or T-SQL scripts.

Prerequisites Learn about prerequisites for database restores.

Prerequisites for restoring a database to a remote server Learn how to restore a database to a remote SQL Server instance.

The Microsoft application agent supports browsing and restoring backups to a remote server.

Restore operations to a remote server are supported through the Application Direct SQL Server Management Studio (SSMS) plug-in only.

The Microsoft application agent and Application Direct SSMS plug-in must be installed on the SQL Server where you will configure the restore operation. Using the SSMS plug-in, you can browse SQL backups from any server on the Data Domain or PowerProtect X400 storage unit and set the target destination to the remote server where you want to restore the data.

Restoring Application Direct Backups

158 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Prerequisites

Ensure that your environment meets the following requirements:

l The Microsoft application agent must be installed on the target remote instance.

l Configure the same lockbox on the target remote instance as the lockbox on the instance where you configure the restore operation. For example, if the instance where you are running the restore has a lockbox with DataDomain1 and StorageUnit1, you must create the same lockbox with DataDomain1 and StorageUnit1 on the target remote instance.

l The SQL Server Agent must be running on the target remote instance. If the remote instance is on the same domain as the server where you are configuring the restore operation, the Microsoft application agent starts the SQL Server Agent automatically during the restore operation. If the remote server is on a different domain, then you must launch the SQL Server Agent on the target server manually.

l You should be able to connect with the remote instance using the Connect to Server option in the SQL Server Management Studio. If you cannot connect to the remote instance, the restore will fail.

Prerequisite to restore a database in an Always On availability group

To restore a database that is part of an Always On availability group, before you start the restore operation, you must remove the database from the Always On availability group.

Re-add the database to the availability group after the restore operation is complete.

Restore a database with the Microsoft app agent for Application Direct plug-in The Microsoft application agent supports a user interface to perform restore operations through a SQL Server Management Studio (SSMS) plug-in.

About this task

The Microsoft application agent caches SQL Server restore settings. The Microsoft application agent automatically loads the information from the last recovery operation and populates restore settings. Caching saves time by eliminating the need to reselect the settings each time you run a restore operation. To clear the cached settings, click Clear Cache.

The Script option is available in each page of the Database Restore tab, which generates a command prompt equivalent script. You can use the script to create a .bat file to perform automation and other tasks. The following script options are available:

l CLI Scripts: To generate the command script, which you can use to run a restore from the command prompt.

l T-SQL Scripts: To generate a restore script in the T-SQL format.

Launching the Microsoft app agent for vProxy Engine SSMS plug-in

To launch the Microsoft app agent for vProxy Engine SSMS plug-in, perform the following steps:

1. From the Windows Start menu, select Microsoft SQL Server Management Studio.

2. In the Microsoft SQL Server Management Studio, in the Connect to Server window, specify the server information and credentials, and then click Connect.

3. In the toolbar, click Microsoft app agent for vProxy Engine.

Note: If you have not installed SSMS, to start the Microsoft app agent for vProxy Engine SSMS plug-in, in the \DPSAPPS\MSAPPAGENT\bin folder, double-click the DDSSMSAddinApp.exe file.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 159

Configure general restore settings To configure SQL restores with the Microsoft app agent for Application Direct SSMS plug-in, you must first specify general restore options on the Database Restore > General page.

Procedure

1. Open the Microsoft app agent for Application Direct window to the Database Restore > General page.

The General page appears as shown in the following figure.

Figure 24 Application Direct - Database Restore-General page

The Microsoft application agent automatically loads the information from the last recovery operation and populates all of the fields under Sources. To clear the cached settings, click Clear Cache.

2. In the Data Domain Server field, select the Data Domain or PowerProtect X400 server that contains the backup.

Note: When you want to restore a replicated backup from a secondary Data Domain or PowerProtect X400 server, select the secondary server. The Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary server.

3. From the SQL Server host list, select the SQL Server host that is the source of the backup. Select the Windows cluster name in the case of federated backups.

4. From the SQL Server Instance list, select the SQL Server instance that contains the databases that you want to restore.

Restoring Application Direct Backups

160 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

The databases located on the SQL Server instance appear in the database table below the SQL Server Instance field.

5. From the database table, select either the entire SQL Server instance by selecting the check box in the header row or select only the required databases to restore.

The save sets on the SQL Server instance that are available for recovery appear in the save sets table below the Browse time field.

By default, the restore process selects the most recent backup timestamp for each selected database. If you have selected a single database, you can perform a point-in-time (PIT) restore.

6. (Optional) To perform a point-in-time restore of a single database, perform the following steps:

a. From the Browse time list, select a date and time, and click Show Versions.

All of the backups that were performed within the specified timeline appear in the save sets table.

b. From the save sets table, select the save set with the timestamp that you want to restore.

Click < < Older or Newer > > to browse additional save sets.

Note: You cannot perform a PIT restore of multiple databases.

7. (Optional) To select the backup timestamp, perform the following steps

By default, the most recent timestamp is used.

a. Click Timeline.

The Backup Timeline dialog box appears, as shown in the following figure. Figure 25 Specifying the restore point

b. Select the backup timestamp, and then click OK.

8. Choose the location where the backup is restored to:

l To perform a recovery directly to the database, perform the following steps:

a. Select Restore to SQL Server.

b. From the Instance list, select the instance where you want to restore the database. You can restore the database to the source instance or an alternate instance.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 161

If you are restoring the database to an instance on a remote SQL Server that is not listed, perform the following steps:

a. From the Instance list, select Browse for more. The Connect to Server window appears.

b. In the Connect to Server window, beside Server Name, click to load the SQL Instances on the network.

c. In the Server Name field, type the instance name or select the name from the list.

d. From the Authentication list, select one of the following authentication modes to connect to the SQL Server:

n Select Windows Authentication when you are restoring to a host in the same domain.

n Select SQL Server Authentication when you are restoring to a host in a different domain

e. Type the login credentials in the Login and Password fields.

f. To access the SQL Agent Service with a proxy user, under Proxy User Of SQL Agent, type the login credentials in the User Name and Password fields. You must type the username in the format of Domain Name\User Name. Specify the proxy user credentials if the SQL Agent service user does not have sufficient permissions to perform a restore operation or if you want to perform restore as a different user.

If the SQL Agent Service on the target server uses a Windows Domain account and you select Windows Authentication, the proxy user credentials are optional.

g. Click OK.

c. From the Database list, select the database where the backup will be recovered to.

l To perform a flat-file recovery, perform the following steps:

a. Select Restore backups as files.

b. In the Folder field, specify the destination for the files. The Folder field is populated with the default destination path.

9. To start the restore operation, click Run.

Configure files and filegroup restore settings When you configure SQL restores with the Microsoft app agent for Application Direct SSMS plug- in, you change the default destination folders of the database files (.mdf and .ndf) and log files (.ldf) on the Database Restore > Files/Filegroups page.

About this task

All settings on the Files/Filegroups page are optional. Note: Settings on the Files/Filegroups page are disabled when you configure a restore to a remote server, including changing the restore path.

Procedure

1. From the left panel, click Files/Filegroups.

The Files/Filegroups page appears as shown in the following figure.

Restoring Application Direct Backups

162 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 26 Application Direct - Database Restore-Files page

2. Under Filegroup Options, to display the corresponding database files of the databases that you have selected on the General page, from the Select Filegroup to restore list, select one of the following options:

l All Files: Displays the database files of all the selected databases.

l PRIMARY: Displays the database files of the selected databases that belong to the PRIMARY filegroup only.

l Custom filegroup name: Displays the database files of the selected databases that belong to the selected custom filegroup name only. In the figure, the custom filegroup names are sec and third.

3. Under Relocation Options, to change the destination restore paths, perform one of the following action sequences:

l To change the destination paths of all of the data and log files, perform the following steps:

a. Select Relocate all files to folder.

b. Click the Data file folder browse button to specify a location for the data files, or click inside the field to type the folder path.

c. Click the Log file folder browse button to specify a location for the log files, or click inside the field to type the folder path.

l To change the destination path for each individual data or log file, perform one of the following actions in the files table:

n To browse for a destination path, click the browse button to the right of each data or log file. A window appears where you can browse and select the file path.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 163

n To type a new destination path, in the Restore As column, click the appropriate cell and type a destination path. If the path does not exist, a dialog box appears asking if you want to create the folder.

Note: The settings under Relocation Options are disabled if you have selected the Restore backups as files option on the General page.

4. To start the restore operation, click Run.

Configure optional database restore settings When you configure SQL database restores with the Microsoft app agent for Application Direct SSMS plug-in, you can specify optional restore settings on the Database Restore > Options page.

About this task

All settings on the Options page are optional.

Procedure

1. From the left panel, click Options to specify optional restore settings.

The Options page appears as shown in the following figure.

Figure 27 Application Direct - Database Restore-Options page

2. To overwrite the existing database with the restored data, select Overwrite the existing database (WITH REPLACE). The database is overwritten only if the database name is unchanged.

If you select the Restore backups as files option, this option is disabled.

Restoring Application Direct Backups

164 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

3. To specify a recovery state, select one of the following options in the Recovery state field:

l RESTORE WITH RECOVERY: To leave the database in the ready-to-use state by rolling back uncommitted transactions, and disable the ability to restore the most recent or additional transaction logs.

l RESTORE WITH NORECOVERY: To leave the database in the non-operational state by not rolling back uncommitted transactions, and enable the ability to restore the most recent or additional transaction logs.

l RESTORE WITH STANDBY: To enable the ability to undo committed transactions, save the undo actions in a standby file that enables you to reverse the restore effects, and put the database in the read-only mode. If you select this option, specify the Standby file field by clicking the button that is located on the right of the field, browsing for the file, and then selecting it.

4. To perform a verify only operation, select Verify only.

A verify only operation verifies that the restore process meets the following requirements without performing the restore operation:

l The backup set that you want to restore is complete and all volumes are readable

l Header fields, such as database page IDs are ready to write data

l Whether the checksum is proper if the backup was performed by selecting the Perform checksum before writing to media option

l Whether the destination host has sufficient space to restore data Note:

n The Verify only option requires sufficient space on the client host to operate.

n If you select the Restore backups as files option, this option is disabled.

5. To compress the restore contents and transport them from the Data Domain Replicator to the application host, select Data Domain Boost compressed restore.

This option reduces the impact on network bandwidth.

6. To generate detailed logs, which you can use to troubleshoot any restore issues, specify a number between 1 and 9 in the Select a debug level field. The default value is 0 (zero).

7. To delete debug logs older than a certain number of days, in the Delete debug logs after field, specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

8. To restore all the backups that were performed during or after a specified start time and up until the time of the backup that is being restored, select Specify a start time for restore.

Specify the start date and time in the corresponding fields beside the Specify a start time for restore field. The start date and time must be before the backup time of the save set that is being restored.

9. To specify advanced recovery options, use the Advanced options field to select or type advanced recovery options.

Separate multiple entries with a comma, for example: BUFFERCOUNT=2, KEEP_CDC, KEEP_REPLICATION

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 165

The following advanced recovery options are supported:

l BUFFERCOUNT=buffer_number: Specifies the total number of IO buffers that can be used during recovery.

l KEEP_CDC : Enables change data capture (CDC) recovery. When restoring a database with CDC enabled, the recover operation works differently depending on the recovery destination.

Use the to KEEP_CDC option to:

n Recover the CDC enabled database on the same SQL instance by overwriting an existing database. In this scenario, KEEP_CDC is optional.

n Recover the CDC enabled database with a different name on the same SQL instance. In this scenario, KEEP_CDC is required.

n Recover the CDC enabled database on a different SQL server instance. In this scenario, KEEP_CDC is required.

l KEEP_REPLICATION: Preserves the replication when recovering a published database. This option is required if a database was replicated when the backup was created.

10. To edit the number of save sets or versions that the Microsoft application agent cache retrieves, specify a number in the Number of entries to retrieve field.

You can specify a value of 1 through 10000. The default value is 50.

11. To perform a tail-log backup of the data before performing a restore operation, select Take tail-log backup before restore.

A tail-log backup ensures that the Microsoft application agent backs up the data that has changed since the previous backup.

Note:

l The Microsoft application agent for Application Direct does not support tail-log backups of multiple databases.

l This option is disabled if the Restore backups as files or Verify only options are selected.

12. To ensure exclusive access to the database during the restore operation if multiple connections exist, select Close existing connections to destination database.

13. To start the restore operation, click Run.

Monitor the restore operation After a database restore operation is run from the Microsoft app agent for Application Direct SSMS plug-in, the Database Restore > Monitor page displays the restore script and status.

The following figure shows the restore information and status as it appears on the Monitor page.

Restoring Application Direct Backups

166 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 28 Application Direct - Database Restore-Monitor page

Note: For information about the success or failure of the restore operation, review the log files that are located in the installation folder. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Perform database restores with the Microsoft application agent for Application Direct recover command

Use the ddbmsqlrc command to configure a restore of Microsoft SQL Server databases from a command prompt.

Note: In the syntaxes, the options that are enclosed in square brackets, that is, [ and ] are optional.

To perform specific backup-related and restore-related operations, the Microsoft application agent also supports the ddbmadmin.exe command besides the msagentadmin.exe command. However, the ddbmadmin.exe command is deprecated.

Syntax to restore databases on a stand-alone server

Run the following command to restore databases in a stand-alone environment:

ddbmsqlrc.exe -c -S {normal | norecover | standby: \undo.ldf} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST= " -a "NSR_DFA_SI_DD_USER= " -a "NSR_DFA_SI_DEVICE_PATH= " [ ] " "

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 167

where:

-c

Specifies the SQL Server hostname, to which you want to restore the required databases. A SQL Server host contains the backed-up stand-alone or clustered SQL Server instances and the corresponding databases.

-S {normal | norecover | standby: \undo.ldf}

Performs one of the following tasks:

l normal: Enables you to roll back uncommitted transactions and use the database to restore the most recent or additional transaction logs.

l norecover: Disables your ability to roll back uncommitted transactions and use the database to restore the most recent or additional transaction logs.

l standby: \undo.ldf: Enables you to undo committed transactions, saves the undo actions in a standby file that enables you to reverse the restore effects, and puts the database in the read-only mode.

-a "NSR_DFA_SI=TRUE"

Specifies that the restore is server-independent.

-a "NSR_DFA_SI_USE_DD=TRUE"

Specifies that the backup is located on a Data Domain or PowerProtect X400 server.

-a "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain or PowerProtect X400 server that contains the backup. When you have a remote (secondary) Data Domain or PowerProtect X400 server that has replicated databases to restore, type the name of the secondary server. A Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary server.

-a "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

" "

Specifies the path to the backup objects that you want to restore. Type the restore path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore backups of the entire instance, type MSSQL: n To restore backups of specific databases, type [MSSQL:]

[[MSSQL:] [...]] For example: "MSSQL:database1" "MSSQL:database2"

l For a named instance, type the path in one of the following formats:

n To restore backups of the entire instance, type MSSQL$ : n To restore backups of specific databases, type MSSQL

$ : [...] For example: "MSSQL$SqlInst1:database1" "MSSQL$SqlInst1:database2"

Restoring Application Direct Backups

168 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Example 26 SQL stand-alone restore command

ddbmsqlrc.exe -c sqlx86.adesc.com -t "Monday, November 11, 2013 1:05:47 PM" -S normal -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.77.27" -a "NSR_DFA_SI_DD_USER=arti1" -a "NSR_DFA_SI_DEVICE_PATH=/artrep2" "MSSQL$SQL2K8:testddr1"

Syntax to restore databases in an Always On availability group

Run the following command to restore databases in an Always On availability group environment:

ddbmsqlrc.exe -c -A -S {normal | norecover | standby: \undo.ldf} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST= " -a "NSR_DFA_SI_DD_USER= " -a "NSR_DFA_SI_DEVICE_PATH= " [ ] " "

where:

-c

Specifies the Windows cluster name that you want to back up. To perform a redirected restore, specify a SQL Server host that is not the current host.

-A

Specifies the SQL virtual server FQDN to restore the databases from the SQL clustered instance.

-S {normal | norecover | standby: \undo.ldf}

Performs one of the following tasks:

l normal: Enables you to roll back uncommitted transactions and use the database to restore the most recent or additional transaction logs.

l norecover: Disables your ability to roll back uncommitted transactions and use the database to restore the most recent or additional transaction logs.

l standby: \undo.ldf: Enables you to undo committed transactions, saves the undo actions in a standby file that enables you to reverse the restore effects, and puts the database in the read-only mode.

-a "NSR_DFA_SI=TRUE"

Specifies that the restore is server-independent.

-a "NSR_DFA_SI_USE_DD=TRUE"

Specifies that the backup is located on a Data Domain or PowerProtect X400 server.

-a "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain or or PowerProtect X400 server that contains the backup. When you have a remote (secondary) Data Domain or PowerProtect X400 server that has replicated databases to restore, type the name of the secondary server. A Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary server.

-a "NSR_DFA_SI_DD_USER= "

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 169

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

" "

Specifies the path to the backup objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore backups of the entire instance, type MSSQL# : n To restore backups of specific databases, type [MSSQL# :]

[[MSSQL# :] [...]] For example: "MSSQL#aag1:database1" "MSSQL#aag1:database2"

l For a named instance, type the path in one of the following formats:

n To restore backups of the entire instance, type MSSQL $ # :

n To restore backups of specific databases, type MSSQL $ # : [...]

For example: "MSSQL$SqlInst1#sql2012-aag3:database1" "MSSQL $SqlInst1#sql2012-aag3:database2"

Example 27 SQL Always On availability group restore command

ddbmsqlrc.exe -c sqlcluster1.adesc.com -A sqlcluster1.adesc.com -t "Monday, November 11, 2013 1:05:47 PM" -S normal -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.77.27" -a "NSR_DFA_SI_DD_USER=arti1" -a "NSR_DFA_SI_DEVICE_PATH=/artrep2" "MSSQL$SqlInst1#sql2012- aag3:database2"

Optional parameters for the ddbmsqlrc command

You can use the following optional parameters with the ddbmsqlrc command.

-a "NSR_DFA_SI_DD_LOCKBOX_PATH= "

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

-t " "

Specifies the backup time stamp that you want to restore.

-a "NSR_ENABLE_FC={TRUE | FALSE}"

Enables database restoration to the Data Domain server through Fibre Channel. The default value is FALSE.

-a "NSR_FC_HOSTNAME= "

Restoring Application Direct Backups

170 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the hostname of the Fibre Channel.

-a "FLAT_FILE_RECOVERY={TRUE | FALSE}"

Performs a flat file restore to files, that is, restores a save set that has a full backup and multiple transaction log and differential backups to files. To know the order in which multiple transaction log backup files are restored, use the save times that are present in the filenames.

The default value is FALSE.

-a "FLAT_FILE_RECOVERY_DIR= "

Specifies the folder, in which the flat file restore files are generated. You can see the generated files in the \ \ location.

-a "DDBOOST_COMPRESSED_RESTORE={TRUE | FALSE}"

Compresses the restore contents and transports them from the Data Domain Replicator to the application host. This option saves network bandwidth. The default value is FALSE.

-a "RESTORE_START_TIME= "

Restores all the backups that were performed at or after a specified backup time (start date and time) and up to the backup time of the selected save set, that is, -t . Specify the start date and time in the /

/
: : {AM | PM} format.

The start date and time must not be after the backup time of the selected save set, that is, -t .

-a "RESTORE_TO_SOURCE_PATH=TRUE"

Ensures that the backup is restored to the original source path by default. The -a "RESTORE_TO_SOURCE_PATH=TRUE" option is overridden if the -C or -H relocation options are used.

-a "CLOSE_SQL_CONNECTIONS={TRUE | FALSE}

Specifies whether to enable exclusive access to the target database by changing the database to single user mode during the restore operation to ensure a successful recovery.

-$

Specifies the target SQL Server instance that contains the target databases that you want to restore. The default value is the instance where the backup was taken. Type the value in one of the following formats:

l For the default instance, type MSSQL l For a named instance, type MSSQL$

-d

Specifies the target database, to which you want to restore the backup. Type the value in one of the following formats:

l

l MSSQL:

l MSSQL$ :

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 171

-C file=path,file2=path2,...

Relocates the database files (.mdf, .ndf, and .ldf) to a different folder. You cannot use the -C parameter and the -H parameter in the same operation.

-H " ' ';' '"

Relocates file paths and all files contained in a path to a different location during a restore operation. The -H command option can be used to relocate multiple file paths in the same command line.

The -H option is supported on standard and redirected restores, which includes the following:

l Normal restoreSame server and same instance.

l Different instance restoreSame server and different instance.

l Restore to different database file.

l Different server restore.

To relocate individual files, see the table entry for the -C option.

You cannot use the -C parameter and the -H parameter in the same operation.

-f

Overwrites the existing database with the current database that you restore if the names of both the databases are same.

-q

Displays ddbmsqlsv messages in the quiet mode, that is, the option displays summary information and error messages only.

-k

Specifies to perform a checksum before restoring the data.

-u

Specifies to perform a checksum before the restore operation but to proceed with the operation even in the case of errors.

-D

Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0 (zero).

-a "DELETE_DEBUG_LOG_DAYS= "

Specifies to delete debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

-V

Verifies whether the restore process meets the following requirements:

l The backup set that you want to restore is complete and all volumes are readable

l Header fields, such as database page IDs, are ready to write data

l Whether the backup was performed by using the checksum option

l Whether the destination host has sufficient space to restore data

-l incr

Restores from the last transaction log backup.

Restoring Application Direct Backups

172 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

When you use the -l incr option, you must restore the backup chain in order. For example, consider the following backup history:

l A full backup taken at 1:31:49PM

l A logs only backup taken at 1:32:42PM

l A logs only backup taken at 1:34:03PM

l A logs only backup taken at 1:34:50PM

To restore this backup chain, perform the following steps:

1. Type the following command to restore up to the second last transaction log backup:

ddbmsqlrc.exe -a NSR_DFA_SI_DD_HOST=10.34.156.120 -a NSR_DFA_SI_DD_USER=ost -a NSR_DFA_SI_DEVICE_PATH=/msappstu4 -a NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox -c mars-jupiter.planets.com -a SKIP_CLIENT_RESOLUTION=TRUE -f -t 09/06/2017 01:34:03 PM -S norecover MSSQL$TESTDB02:info3

2. Type the following command to restore the last transaction log backup with -l incr:

ddbmsqlrc.exe -a NSR_DFA_SI_DD_HOST=10.34.156.120 -a NSR_DFA_SI_DD_USER=ost -a NSR_DFA_SI_DEVICE_PATH=/msappstu4 -a NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox -c mars-jupiter.planets.com -a SKIP_CLIENT_RESOLUTION=TRUE -f -l incr -S normal MSSQL$TESTDB02:info3

-O " , , ..."

Specifies advanced recovery options. Separate each option with a comma. The following table describes the advanced recover options that are available:

l BUFFERCOUNT= : Specifies the total number of IO buffers that can be used during a recovery operation.

l KEEP_CDC: Enables change data capture (CDC) recovery.

l KEEP_REPLICATION: Preserves the replication when you recover a published database. This option is required if a database was replicated when the backup was created.

l READ_WRITE_FILEGROUPS: Recovers only the read/write (active) filegroups from the backup. This option can only be used to recover backups taken with the READ_WRITE_FILEGROUPS option. You cannot specify filegroup or file level recover targets with the READ_WRITE_FILEGROUPS option. If you are relocating multiple filegroups during the restore, you can use the -H option for global relocation.

After you restore a backup with the READ_WRITE_FILEGROUPS option, any read-only filegroups in the database will enter the recovery pending state and the rest of the filegroups will go online.

There are two different scenarios to recover cumulative incremental READ_WRITE_FILEGROUPS backups:

n If you have taken a full READ_WRITE_FILEGROUPS backup prior to the cumulative incremental backup, the Microsoft application agent will chain together the two backups in the correct order and complete the restore.

n If you have not taken a full READ_WRITE_FILEGROUPS backup but want to use a normal full backup as the differential base for the cumulative incremental READ_WRITE_FILEGROUPS backup, you must first restore the full backup normally and leave the database in no recovery mode, and then apply the READ_WRITE_FILEGROUPS differential backup with the -z option.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 173

-z

Enables implementation of a recovery plan in independent command line operations. Normally the Microsoft application agent builds the recovery plan, ensuring that all the required backups are available and that they run in the proper order and with the proper options. The - z option removes safety checks. This option is used in more complex recoveries. The following example commands use the following backup history:

l savetime 1:00 - full

l savetime 2:00 - txnlog

l savetime 3:00 - txnlog

To recover multiple backups and restore a database in a single command, type the following command:

ddbmsqlrc ... -t "savetime 3:00" ...

This command recovers the entire recovery chain, from the first full backup to the last logs- only backup.

To recover this recovery chain and restore a database in a series of independent commands, type:

ddbmsqlrc ... -z -S norecovery -t "savetime 1:00" ...

ddbmsqlrc ... -z -S norecovery -t "savetime 2:00" ...

ddbmsqlrc ... -z -S normal -t "savetime 3:00" ...

These three commands recover each backup individually.

The -z option disables building the recovery plan and recovers only the specified backup. This command is required for all backups except for level full backups.

Use the -S norecovery option with the -z option to prepare the database for more restores. This command is required for all except the last recovery command. The final command recovers the last logs-only backup and brings the database online.

Note: A point-in-time restore within the final txnlog can be specified by replacing the save time. For instance, in the previous example, you can replace 3:00 with 2:45. The database is not available for general use until after the final recovery completes. Any missing, incorrect, or out-of-order save times result in SQL Server reporting errors.

Perform database restores with T-SQL scripts The Microsoft application agent for Application Direct enables you to generate a SQL-CLR script that you can use to restore SQL Server databases.

The SQL-CLR restore command, emc_run_restore uses the Microsoft application agent for Application Direct with SQL Server restore CLI options. You must also provide VARCHAR parameters to this command. To use this command, you must have a detailed knowledge of the Microsoft application agent for Application Direct with SQL Server restore CLI options. Perform database restores with the Microsoft application agent for Application Direct recover command on

Restoring Application Direct Backups

174 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

page 167 provides information about the Microsoft application agent for Application Direct with SQL Server restore CLI options.

Sample T-SQL restore script

The following SQL-CLR script is an example of a restore script:

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_restore ' -c win8sqlsp.sharepoint.com - f -t "02/03/2015 04:04:36 AM" -S normal -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=10.31.192.10" -a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/ddsub7" -d "MSSQL:dbtest" "MSSQL:db100"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

You can use any SQL Server standard interfaces, such as the SSMS Query window and OSQL command prompt tool, to run the SQL-CLR scripts.

Best practices to back up SQL Server with Application Direct on page 87 provides guidelines for better performance of SQL Server restores by using the Microsoft application agent for Application Direct SQL-CLR scripts.

Performing SQL Server push restores by using the Microsoft application agent for Application Direct T-SQL scripts

About this task

To restore either all databases or only the specific databases of a SQL Server instance from a Data Domain or PowerProtect X400 device to a destination host by using a different host, perform the following steps.

Procedure

1. Start SSMS on a different host that you use to perform the restore.

2. Connect to the destination SQL Server instance on the destination host.

3. In the SSMS window on the different host, click New Query.

4. In the New Query window, run the T-SQL script to perform the restore.

Results

You can either generate the T-SQL script by using the Microsoft application agent SSMS plug-in GUI on the destination host and copy it to the New Query window on the different host or write the T-SQL script in the New Query window. Restore a database with the Microsoft app agent for Application Direct plug-in on page 159 and Perform database restores with T-SQL scripts on page 174 provide information.

Example 28 T-SQL push restore script

Consider the following example T-SQL push restore script:

USE [master] GO DECLARE @returnCode int

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 175

Example 28 T-SQL push restore script (continued)

EXEC @returnCode = dbo.emc_run_restore ' -c clust- sql-01.contoso.com - A clust-sql-02.contoso.com -f -t "06/22/2015 02:38:48 PM" -S normal -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=nmmddtwo.sp2010.com" -a "NSR_DFA_SI_DD_USER=ost" - a "NSR_DFA_SI_DEVICE_PATH=/ddbmav2b75" -d "MSSQL$Inst1:CLUST-SQL-02- DB02" "MSSQL$Inst1:CLUST-SQL-02-DB01"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

where:

l clust-sql-01.contoso.com is the source host from which the backup was performed.

l Inst1 is the destination SQL Server instance, to which you must connect from the different host to perform the restore.

l CLUST-SQL-02-DB02 is the destination database.

l CLUST-SQL-02-DB01 is the database that was backed up from the source host.

Restoring SQL Always On availability groups by using T-SQL scripts

To restore databases from federated backups, use the same restore command and options that Perform database restores with T-SQL scripts on page 174 describes, but for in -c , specify the Windows cluster name.

The options in the following example scripts indicate the modification.

Example 29 Sample T-SQL script to restore a federated backup to the source database

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_restore '-a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_DEVICE_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C: \Program Files\DPSAPPS\common\lockbox" -c sql2012clus3.brsvlab.local - C" 'testdb1_Data'='E:\sql2012_data\ database1.mdf', 'testdb1_Log'='F: \sql2012_log\database1_log.LDF'" -f -S normal -$ "MSSQL$SQ12INST4:" -d "MSSQL$SQ12INST4:database1" "MSSQL$SQ12INST4:database1"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Restoring Application Direct Backups

176 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Example 30 Sample T-SQL script to restore a federated backup to a different instance and database (redirected restore)

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_restore '-a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_DEVICE_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C: \Program Files\DPSAPPS\common\lockbox" -c sql2012clus3.brsvlab.local - C" 'testdb1_Data'='E:\sql2012_data\database1.mdf', 'testdb1_Log'='F: \sql2012_log\database1_log.LDF'" -f -S normal -$ "MSSQL$SQ12INST4:" -d "MSSQL$SQ12INST5:copy-database1" "MSSQL$SQ12INST4:database1"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Example 31 Sample T-SQL script to restore multiple databases of a federated backup

Note: When you restore multiple databases, do not use the -C and -d options with the T-SQL restore command. If you do, the restore fails.

USE [master] GO DECLARE @returnCode int EXEC @returnCode = dbo.emc_run_restore '-a "NSR_DFA_SI_DD_HOST=ddve-01" -a "NSR_DFA_SI_DD_USER=sqlboost" -a "NSR_DFA_SI_DEVICE_PATH=/sqlboost" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C: \Program Files\DPSAPPS\common\lockbox" -c sql2012clus3.brsvlab.local - f -S normal -$ "MSSQL$SQ12INST4:database1" "MSSQL $SQ12INST4:database2"' IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Performing table-level recovery The Microsoft application agent supports table-level recovery of SQL Server data using the Microsoft app agent for Application Direct SSMS plug-in.

The Microsoft application agent does not support the Script option to perform table restores using a command prompt or T-SQL scripts.

Table-level restore workflow Before you begin

When you install the Microsoft application agent, you must install ItemPoint to perform table-level restores. Otherwise, the Table Restore tab does not appear in the Microsoft app agent for Application Direct SSMS plug-in.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 177

About this task

To perform table-level restores, you must first mount the backup images and specify mount options by using the Microsoft app agent for Application Direct SSMS plug-in. Once the backup is mounted, use ItemPoint for Microsoft SQL Server to complete the table restore.

NOTICE In the scenario where you have large databases where a large amount of data is recently committed to the databases, a table restore may not be appropriate.

Committed data is represented as outstanding transactions when there are SQL Server full and incremental backups on the database. When you perform table-level recovery, ItemPoint must load all the outstanding transactions that are present in a backup.

To load large databases, ItemPoint requires a few hours to read the data because of poor Virtual File System performance. This problem occurs while ItemPoint loads the database and ItemPoint may appear to stop responding while reading the backup. If you observe this problem, an alternative to using SQL table-level recovery is to restore the backup as flat files to a server where you have enough space, and then use ItemPoint to restore the files on the local disk.

Launching the Microsoft app agent for vProxy Engine SSMS plug-in To launch the Microsoft app agent for vProxy Engine SSMS plug-in, perform the following steps:

1. From the Windows Start menu, select Microsoft SQL Server Management Studio.

2. In the Microsoft SQL Server Management Studio, in the Connect to Server window, specify the server information and credentials, and then click Connect.

3. In the toolbar, click Microsoft app agent for vProxy Engine.

Note: If you have not installed SSMS, to start the Microsoft app agent for vProxy Engine SSMS plug-in, in the \DPSAPPS\MSAPPAGENT\bin folder, double-click the DDSSMSAddinApp.exe file.

Configure general table restore settings To configure SQL table-level restores with the Microsoft app agent for Application Direct SSMS plug-in, you must first specify general table restore options on the Database Restore > General page.

Procedure

1. Open the Microsoft app agent for Application Direct window to the Table Restore > General page.

The General page appears as shown in the following figure.

Restoring Application Direct Backups

178 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 29 Application Direct - Table Restore-General page

The Microsoft application agent caches SQL Server restore settings. The Microsoft application agent automatically loads the information from the last recovery operation and populates restore settings. Caching saves time by eliminating the need to reselect the settings each time you run a restore operation. To clear the cached settings, click Clear Cache.

2. Use the DataDomain Server field to select Data Domain or PowerProtect X400 server and the storage unit to restore the data. A storage unit contains the backed-up SQL Server hosts.

Note: When you want to restore a replicated backup from a secondary Data Domain or PowerProtect X400 server, select the relevant server. The Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary Data Domain server.

3. From the SQL Server host list, select the SQL Server host that contains the backup. Select the Windows cluster name in the case of federated backups.

To perform a redirected restore, select the SQL Server host where you want to restore the backup to.

4. From the SQL Server Instance list, select the SQL Server instance that contains the backup.

5. From the Database list, select the database that you want to restore.

The corresponding save sets appear in the save sets table that is located below the Browse time field.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 179

6. To select the backup that you want to restore, perform either of the following actions:

l Select a save set in the save sets table that is located below the Browse time field. Use the backup timestamp to choose the backup.

l To browse for a backup that is not listed, perform the following steps:

n From the Browse time list, select a date and time, and then click Show Versions.

n From the save sets table, select the save set with the timestamp that you want to restore. Click < < Older or Newer > > to browse additional save sets.

7. To mount the backup and proceed with the table restore, click Run.

Results

The backup is mounted and the ItemPoint for Microsoft SQL Server GUI appears.

Configure optional table restore settings When you configure SQL backups with the Microsoft app agent for Application Direct SSMS plug- in, you can specify optional backup settings on the Table Restore > Options page.

About this task

All settings on the Options page are optional.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure.

Figure 30 Application Direct - Table Restore-Options page

All settings on the Options page are optional.

Restoring Application Direct Backups

180 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

2. In the Mount Folder field, specify the location to mount the backup images.

Note: The location (folder or drive) to mount the backup images must be empty. Otherwise, the mount operation fails. To mount the backup as a drive, specify an unused drive letter. The restore operation, after completion, deletes the mount location.

3. In the Mount Expire list, specify the number of hours, after which the mounted backup image must be dismounted. The default value is 8. The valid range is between 1 and 24 hours.

4. To select the level of information recorded in the logs which can be used in troubleshooting recovery issues, select Select a debug level.

Levels range 0-9, with 0 representing no information and 9 representing the most amount of information. The default value is 0 (zero).

5. To change the restore parallelism setting, type or select a value in the Parallelism field.

Parallelism controls the number of recovery sessions the NWFS process uses while mounting a backup. The default and maximum value is 31.

6. To mount the backup and proceed with the table restore, click Run.

Results

The backup is mounted and the ItemPoint for Microsoft SQL Server GUI appears.

Monitor the table restore mount operation After a table-level restore mount operation is run from the Microsoft app agent for Application Direct SSMS plug-in, the Table Restore > Monitor page displays the mount script and status.

The following figure shows the mount information and status as it appears on the Monitor page.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 181

Figure 31 Application Direct - Table Restore-Monitor page

Note: For information about the success or failure of the restore operation, review the log files that are located in the installation folder. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restore table-level data using ItemPoint After the backup images are mounted using the Microsoft application agent SSMS plug-in, complete the table-level restore using ItemPoint for Microsoft SQL Server.

Before you begin

Configure and run the table level restore operation with the Table Restore tab in the Microsoft application agent SSMS plug-in.

About this task

Once the table level restore is configured and run through the Microsoft application agent SSMS plug-in, ItemPoint launches.

If you select Do not run ItemPoint after mounting the backup images when you configure the table level restore, you must manually launch ItemPoint, and then launch the Data Wizard.

Procedure

1. On the Select Source page, select the source backup files from the mounted volume that contains the SQL backup data as shown in the following figure, and then click Next.

Restoring Application Direct Backups

182 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 32 ItemPoint Data Wizard: select the source files

2. On the Select Target Server page, specify the details and login credentials for the target SQL Server and database.

The following figure shows the ItemPoint Data Wizard Select Target Server page:

Figure 33 ItemPoint Data Wizard: select the target server

3. Click Finish.

The Data Wizard closes and ItemPoint loads the tables contained in the source backup files.

4. Use ItemPoint to browse and restore the individual tables.

Note: The PowerProtect ItemPoint for Microsoft SQL Server User Guide provides more information on using ItemPoint for Microsoft SQL Server to restore table-level data.

5. To dismount the mounted backup images, exit ItemPoint for Microsoft SQL Server.

Note: If you select Leave backup images mounted after ItemPoint exits or Do not run ItemPoint after mounting the backup images when you configure the mount

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 183

operation, the backup image remains mounted for 4 hours. To dismount the backup manually, use the msagentadmin command.

Performing SQL Server disaster recovery When a disaster scenario occurs, the Microsoft application agent supports disaster recovery of data located on both a Data Domain server and Data Domain Cloud Tier.

Perform SQL Server disaster recovery The Microsoft application agent for Application Direct supports disaster recovery.

Procedure

1. Create a target Windows host with the same name as the source hostname.

2. Install a SQL Server instance with the same name as the source instance name.

3. Install the Microsoft application agent on the target Windows host.

4. Browse the backups of the source instance by selecting the appropriate storage unit.

5. Restore the system databases, such as master, model, msdb, and so on, to the target instance.

6. Restore all the user databases to the target instance.

Perform disaster recovery from the Data Domain Cloud Tier The Microsoft application agent provides a command line tool to complete disaster recovery of save sets that are located in a Data Domain Cloud Tier.

Note: PowerProtect X400 systems do not support Data Domain Cloud Tier.

After an MTree is recovered according to the disaster recovery procedure described in Perform SQL Server disaster recovery on page 184, you must restore the backup indexes from the Data Domain Cloud Tier.

When the Microsoft application agent moves a backup to the cloud, the index files are maintained on the active tier. A copy of the index files is created and moved to the cloud tier for long-term retention.

After an MTree is restored during a disaster recovery, all the files that resided only on the active tier are lost and unavailable. Only the files that were moved to the cloud are available.

In this case, you must run msagentadmin administration with the --dr-recall or -M flag to restore the indexes.

After the indexes are recalled to the active tier, the data save sets for the same time range are also recalled unless you type n when prompted with Continue with the recall of the found save sets [y/n]. If you choose to not recall the save sets, you can manually recall the save sets later.

Type the msagentadmin.exe administration command with the following syntax to recall the indexes to the active tier:

msagentadmin.exe administration --dr-recall --ddhost "<Data_Domain_server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" --appID "mssql"

where:

--dr-recall

Restoring Application Direct Backups

184 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies an operation to recall save sets for disaster recovery. You can use the -M alias for the --dr-recall parameter.

--ddhost " "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

--ddpath " "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

--appID "mssql"

Specifies the application ID (namespace) to locate backups. You can use the -n alias for the --appID parameter.

Consider the following example commands to perform disaster recovery of SQL Server with data located on a Data Domain Cloud Tier device:

Example 32 Cloud tier disaster recovery recall command without a configuration file

msagentadmin administration --dr-recall --tier --after 1481104962 -- before 1481105533 --appID mssql --ddhost "10.70.102.111" --ddpath "/ mt1" --dduser "ost" --confirm --client SQLX86.adesc.com --debug 9

Example 33 Cloud tier disaster recovery recall command with a configuration file

msagentadmin.exe administration --dr-recall --tier --after 1481104962 --before 1481105533 --appID mssql --confirm --config c:\temp\config_pp.txt --debug 9

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 185

Restoring Application Direct Backups

186 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 7

Restoring Storage Direct Backups

This chapter includes the following sections:

l ProtectPoint restore workflow.............................................................................................188 l Best practices to restore SQL Server with Storage Direct...................................................189 l Restore a backup from a secondary Data Domain system.................................................... 190 l Restoring SQL Server databases......................................................................................... 192 l Performing rollback restores............................................................................................... 205 l Restore an availability group to an alternate instance.......................................................... 216 l Restoring SQL Server table-level data................................................................................. 217 l Performing SQL Server disaster recovery with Storage Direct........................................... 229

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 187

ProtectPoint restore workflow The ProtectPoint restore workflow is different for RecoverPoint and VMAX.

Storage Direct with RecoverPoint restore workflow The Storage Direct with RecoverPoint restore workflow includes the following steps:

1. The database administrator starts a Storage Directrestore by running the database native recovery tool on the recovery host.

2. The database native recovery tool requests the Microsoft application agent to restore the required data, and provide a backup handle.

3. The Microsoft application agent looks in its own catalog to find the requested backup, which consists of static images on the Data Domain system.

4. The Microsoft application agent instantiates the corresponding static images that are present on the restore LUNs, on the Data Domain system by using the vdisk service.

5. By default, the Microsoft application agent directly mounts the restore LUNs to the recovery host, which can be either the original application host or a different host, and copies the required files to the requested locations.

6. If the DBA selects a rollback restore to the original host, the Microsoft application agent requires the RecoverPoint cluster to perform a LUN-level restore to the original source LUNs. In the case of a RecoverPoint version that is earlier than 5.0, if the DBA selects a rollback restore, the Microsoft application agent requires the RecoverPoint cluster to restore the entire consistency group to the original source LUNs. If the consistency group that you restore contains multiple LUNs, all the LUNs are overwritten, and inaccessible during the rollback restore, even if the backed-up objects are present on only certain LUNs.

Depending on the type of database, the database recovery tool can apply the transaction logs to make the database consistent or to roll forward to a time after the backup occurred. If the logs are not present on the application host, the Microsoft application agent restores the logs and applies them by using either a Application Direct restore operation or a Storage Direct restore operation. The type of restore depends on how the logs were backed up.

Storage Direct with VMAX restore workflow The Storage Direct with VMAX restore workflow includes the following steps:

1. The DBA starts a Storage Direct restore by running the database native recovery tool on the recovery host.

2. The database native recovery tool requests the Microsoft application agent to restore the required data, and provide a backup handle.

3. The Microsoft application agent looks in its own catalog to find the requested backup, which is a static image on the Data Domain system.

4. Depending on the type of restore you are performing, one of the following actions occur:

l During rollback restore operations, the Microsoft application agent links the snapshot to the VMAX LUN, which is known as the Microsoft application agent's restore LUN.

l During all other restore operations, the Microsoft application agent instantiates the corresponding static image to a Data Domain vdisk device, which is an encapsulated FAST.X LUN on a VMAX array. The FAST.X LUN is known as the Microsoft application agent's restore LUN.

5. By default, the Microsoft application agent mounts the restore LUN back to the recovery host, and copies the required files to the requested locations.

Restoring Storage Direct Backups

188 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

If the DBA selects a rollback restore to the original host, then the Microsoft application agent performs a VMAX LUN-level restore to the original source device.

If the DBA selects a rollback restore to an alternate host, then the Microsoft application agent performs a VMAX LUN-level restore to the alternate target device.

Depending on the type of database, the database recovery tool can apply the transaction logs to make the database consistent or to roll forward to a time after the backup occurred. If the logs are not present on the application host, the Microsoft application agent restores the logs and applies them by using either a Application Direct restore operation or a Storage Direct restore operation. The type of restore depends on how the logs were backed up.

Best practices to restore SQL Server with Storage Direct The following are the best practices to restore SQL Server by using the Microsoft application agent for Storage Direct.

Install PowerPath

Install PowerPath on the host on which you want to use multipathing.

Use supported characters

The Microsoft application supports locale-specific date and time processing and setting the date and time display language can be set to non-English characters. However, database and path names must be written in ASCII characters only. Naming conventions for backups with Storage Direct on page 135 provides more information on supported characters for database and instance names.

Stop VSS when you stop VSS Storage Direct Hardware Provider

When you manually stop or restart VSS Storage Direct Hardware Provider, you must stop or restart Volume Shadow Copy also.

Ensure SQL Server binaries are not on the restore drive

When you perform a restore, ensure that the SQL Server binaries are not present on the drive that is part of the restore.

Check that the destination host has sufficient space

Always ensure that a destination host has sufficient space to restore data.

Use a single volume on each LUN for only one type of application server data

Use a single volume on the XtremIO and VMAX LUNs.

If a LUN contains multiple volumes, the volumes that are not included in the backup become only crash-consistent. Also, a rollback (LUN level) restore rolls back an image on the whole LUN. So, this setup or configuration does not support the rollback restore. The Microsoft application agent does not know about the excluded volumes for the backup because there is no special safety check.

The XtremIO and VMAX LUNs must contain data for only one type of application server. For example, if you are using a LUN to back up SQL Server data, the same LUN cannot be used to protect Exchange Server data. If the LUNs contain data from more than one type of application server, the data that is not included in the backup becomes only crash-consistent.

Note: Do not perform or use nested mounts on volumes because Microsoft VSS does not support the feature.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 189

Configure usage limits for Data Domain streams

Configure a sufficient number of Data Domain streams for better performance of backups and restores. The streams control backup and restore parallelism for each database.

The Microsoft application agent requires one stream per save set that you back up or restore. When you perform striped backups, each stripe requires one stream. The stripes are concurrently executed for each database. Databases are sequentially backed up and restored. When you use stripes, the number of streams must be equal to or more than the number of stripes.

The minimum number of streams for a non-stripe environment is 1.

Configuring usage limits of Data Domain streams on page 33 provides more information about streams limit, impact of exceeding the limits, and configuring the usage limits.

Restore a backup from a secondary Data Domain system You must meet certain configuration requirements before you can browse and restore backups from a secondary Data Domain system.

Before you begin

Ensure that the Data Domain collection replication pair is deleted. The Data Domain Operating System Administration Guide provides information about how to delete the collection replication.

About this task

These configuration steps allow you to perform any type of restore operation from a secondary Data Domain system.

Procedure

1. Replicate the Mtree (storage unit) that has the Data Domain backup catalog information from the primary Data Domain system to the secondary Data Domain system using the Data Domain System Manager.

2. Replicate the vdisk pool from the primary Data Domain system to the secondary Data Domain system using the Data Domain System Manager.

3. Register the vdisk pool with the Data Domain vdisk user who will run the backup by typing the following command on the secondary Data Domain system:

vdisk pool register user

4. Use the show list command to list the vdisk static-image information on the secondary Data Domain system. The list should reflect the static image information that is available on the primary Data Domain system.

vdisk device show list

5. Create a pool, device group, and vdisk devices on the secondary Data Domain system.

The Data Domain collection replication replicates all the vdisk pools from the source Data Domain system to the secondary Data Domain system. However, the vdisk devices in the replicated vdisk pool have no associated WWN. Hence, the Microsoft application agent cannot use them as restore devices. To prepare the restore LUNs on a secondary Data Domain system, you must create a vdisk pool, and create devices within this pool.

Restoring Storage Direct Backups

190 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

a. To create the vdisk pool, run the following command:

vdisk pool create user

This pool will be used as the restore device pool of the Microsoft application agent.

b. To create a vdisk device group, run the following command:

vdisk device-group create pool

This group will be used as the restore device group of the Microsoft application agent.

c. To create the vdisk devices, run the following command:

vdisk device create [count ] capacity {MiB|GiB|TiB|PiB| sectors} pool device-group

The devices will be used as the restore devices for the Microsoft application agent.

Results

After you perform these steps, you can browse and perform restores from the secondary Data Domain system Mtree (storage unit) created in step 1.

After you finish

While configuring a restore, ensure that the Data Domain parameters point to the secondary Data Domain system and the new vdisk devices.

The following table lists the Data Domain parameters you must set to the secondary Data Domain system, either directly in the restore command or in the configuration file. There are no specific parameters for secondary Data Domain systems so set these parameters as you would for a primary system.

Table 16 Restore parameters to point to a secondary DD system

Parameter Description

DDBOOST_USER= Specifies the username of the DD Boost user configured on the secondary Data Domain system.

DDVDISK_USER= Specifies the DD vdisk username that was specified during creation of the replication vdisk device pool on the secondary Data Domain system.

DEVICE_HOST= Specifies the hostname as the fully qualified domain name of a secondary Data Domain system.

DEVICE_PATH= Specifies the name of the storage unit or a top-level directory within the storage unit on a secondary Data Domain system.

RESTORE_DEVICE_POOL=

Specifies the name of the DD vdisk device pool that provides the restore LUNs on the secondary Data Domain system.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 191

Table 16 Restore parameters to point to a secondary DD system (continued)

Parameter Description

RESTORE_DEVICE_GROUP=

Specifies the DD vdisk device group in the vdisk device pool that contains the restore LUNs to use.

Restoring SQL Server databases The Microsoft application agent for Storage Direct with SQL Server supports multiple tools to recover databases.

You can recover databases using the Microsoft application agent SQL Server Management Studio plug-in (GUI), Microsoft application agent for Storage Direct commands, or T-SQL scripts.

Restoring SQL Server databases using the Microsoft app agent for Storage Direct SSMS plug-in

About this task

The Script view is available in each page, which generates a command prompt equivalent script, which you can use to create a .bat file to perform scheduled backups, automation, and other tasks.

l CLI Scripts: To generate the command script, which you can use to run a restore operation from the command prompt.

l T-SQL Scripts: To generate a backup script in the T-SQL format. You can use the T-SQL scripts to restore SQL Server using the Microsoft application agent for Storage Direct.

Launch the Microsoft app agent for Storage Direct SSMS plug-in

To open the Microsoft app agent for Storage Direct SSMS plug-in, from the Windows desktop, click Start > Microsoft SQL Server Management Studio > Microsoft app agent for Storage Direct.

NOTICE If you have not installed SSMS, to start the Microsoft app agent for Storage Direct SSMS plug-in, run the DDSSMSAddinApp.exe pp command from the \DPSAPPS\MSAPPAGENT\bin folder.

Configure general database restore settings To configure SQL database restores with the Microsoft app agent for Storage Direct SSMS plug- in, you must first specify general restore options on the Database Restore > General page.

Before you begin

To restore a database that is part of the Always On availability group, you must first remove the database from the Always On availability group before configuring the restore operation. After the restore is complete, add the database back to the Always On availability group.

Procedure

1. Open the Microsoft app agent for Storage Direct window to the Database Restore > General page.

The General page appears as shown in the following figure.

Restoring Storage Direct Backups

192 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 34 Storage Direct - Database Restore-General page

2. Click the browse button beside Data Domain Server to select the Data Domain server and the storage unit to restore either SQL Server instance or required databases.

A storage unit contains the backed up SQL Server hosts. Note: In the case of a remote (secondary) Data Domain server that has replicated databases to restore, select the relevant server. A Data Domain user on the Data Domain server must be in the same group as the primary Data Domain server.

3. Use the SQL Server host list to select a SQL Server host to restore the required databases.

A SQL Server host contains the backed up SQL Server instances, and the corresponding databases.

4. Use the Start browsing from list to select a backup save time, and then click Show Versions.

The backups that were performed within the specified save time appear in the save sets table.

5. From the SQL Server Instance list, select the SQL Server instance that contains the databases that you want to restore.

A SQL Server instance contains databases and can be either stand-alone or cluster. Note: Consider the following information:

l The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host.

l If you are restoring data to an alternate instance, you must restore only one database per restore operation.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 193

The corresponding databases appear in the databases table that is below the SQL Server Instance field.

6. From the databases table, select either the entire SQL Server instance by selecting the check box in the header row or only the required databases to restore.

Note: Do not select the databases that belong to multiple snapshots in the same restore operation.

The corresponding save sets appear in the save sets table that is below the databases table. The restore process restores the latest backup of each selected database.

7. Under Destination, click Timeline.

The Backup Timeline dialog box appears as shown in the following figure. Figure 35 Specifying the restore point

8. Select the backup timeline, and then click OK.

9. Perform one of the following action sequences, depending on the restore type:

l To perform a recovery directly to a database, perform the following steps:

a. Select Restore to SQL Server.

b. From the Instance list, select the SQL Server instance that contains the target database.

Note: The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host.

c. From the Database list, select the database where the backup will be recovered to.

l To recover the database as flat-files, perform the following steps:

a. Select Restore backups as files.

b. In the Folder field, specify the destination for the files. The Folder field is populated with the default destination path. To perform a redirected restore, change the destination path by clicking the browse button beside the Folder field, and specifying the required destination.

Note: Ensure that the destination path is not a root drive, for example, E:\.

10. To start the database restore operation, click Run.

Restoring Storage Direct Backups

194 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configure file destination settings View and change the default destination folders of the database files that are data files (.mdf and .ndf) and log file (.ldf) from the Database Restore > Files page.

About this task

All settings on the Files page are optional.

NOTICE The Relocate all files to folder option and the table on the Files page are disabled if you have selected the Restore backups as files option on the General page.

Procedure

1. From the left panel, click Files to perform redirected restores.

The Files page appears as shown in the following figure.

Figure 36 Storage Direct - Database Restore-Files page

The table on the page displays the source locations of the database files.

2. To change the destination paths of all of the data and log files, perform the following steps:

a. Select Relocate all files to folder.

b. Click the Data file folder browse button to specify a location for the data files, or click inside the field to type the folder path.

c. Click the Log file folder browse button to specify a location for the log files, or click inside the field to type the folder path.

3. To change the destination path at the file group level, perform one of the following actions in the table:

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 195

l To browse for a destination path, click the browse button to the right of each file group. A window appears where you can browse and select the file path.

l To type a new destination path, in the Restore To column, click the appropriate cell and type a destination path. If the path does not exist, a dialog box appears asking if you want to create the folder.

Note: Ensure that the destination paths are not root drives, for example, E:\.

4. To start the restore operation, click Run.

Configure optional database restore settings When you configure SQL database restores with the Microsoft app agent for Storage Direct SSMS plug-in, you can specify optional restore settings on the Database Restore > Options page.

About this task

All settings on the Options page are optional.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure. Figure 37 Microsoft app agent for Storage Direct - Database Restore-Options page

2. In the Recovery state list, select one of the following options, as required:

Restoring Storage Direct Backups

196 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Option Description

RESTORE WITH RECOVERY

To leave the database in the ready-to-use state by rolling back uncommitted transactions, and disable the ability to restore the latest or additional transaction logs.

RESTORE WITH NORECOVERY

To leave the database in the non-operational state by not rolling back uncommitted transactions, and enable the ability to restore the latest or additional transaction logs.

3. To compress the restore contents and transport them from the Data Domain Replicator to the application host, select Data Domain Boost compressed restore.

This option reduces network bandwidth.

4. To generate detailed logs, which you can use to troubleshoot the restore issues, select Select a debug level, and then specify a value of 1 through 9. The default value is 0 (zero).

5. To delete debug logs older than a certain number of days, select Delete debug logs after, and then specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

6. To enable advanced restore options, type or select one of the following options in the Advanced options list:

Option Description

KEEP_REPLICATION Preserves the replication when recovering a published database. This option is required if a database was replicated when the backup was created.

KEEP_CDC Enables change data capture (CDC) recovery. When restoring a database with CDC enabled, the recover operation works differently depending on the recovery destination. Use the to KEEP_CDC option to:

l Recover the CDC enabled database with a different name on the same SQL instance. In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on a different SQL server instance. In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on the same SQL instance by overwriting an existing database. In this scenario, KEEP_CDC is optional.

Separate multiple advanced options with a comma.

7. To limit the backup history of the databases on the General page to a set number of days, type or select a number in the Days of backup history field.

The default value is 30.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 197

8. To use the client name that is provided as-is without converting it to the fully qualified domain name (FQDN), select Exclude client name resolution.

Use this option to restore backups taken with Microsoft application agent version 4.5 or earlier that use the short name as the client name.

9. To perform a transaction log backup of the data before performing restore, select Take tail- log backup before restore.

The tail-log backup ensures that the Microsoft application agent backs up the data that has changed from the previous backup.

Note: The restore operation does not restore the logs of the previous tail-log backup. This option is disabled if you have selected Restore backups as files on the General page.

The Microsoft application agent does not support the tail-log backup of multiple databases.

10. Under Restore Method, specify the details for the device that you want the restore operation to use:

l For VMAX environments, to restore with a FAST.X restore device, perform the following steps:

a. From the Restore with menu, select FAST.X (VMAX only).

b. In the Storage Group field, type the name of the VMAX FAST.X restore storage group where the restore FTS devices are assigned to the host. The default value is NsrSnapSG.

c. In the Static Image Pool field, type the name of the static image pool when restoring from a secondary Data Domain. This field is populated by default for restores from the primary Data Domain.

d. If you want to restore from a backup older than the latest backup, select Ignore local snapshots. By default, the restore operation uses the local snapshot copy on the VMAX array, when available. The local snapshot is the latest available backup. To restore from any backup older than the latest snapshot copy, you must select this option.

l To restore with a Data Domain vdisk device, perform the following steps:

a. From the Restore with menu, select Data Domain vdisk.

b. In the Device Pool field, type the name of the vdisk restore device pool that contains the vdisk devices that you want use to perform the restore operation. Ensure that the device pool belongs to the Data Domain server that you have selected on the General page.

c. In the Device Group field, type the name of the restore device group that contains the vdisk devices and the restore device pool that you want to use to perform the restore operation. Ensure that device group belongs to the Data Domain server that you have selected on the General page.

Note: To mount VMAX static images and restore the data directly from Data Domain, ensure that the vdisk devices are masked to the application host. The Data Domain documentation provides information.

d. In the Static Image Pool field, type the name of the static image pool.

11. To start the restore operation, click Run.

Restoring Storage Direct Backups

198 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Monitor the restore operation After a database restore operation is run from the Microsoft app agent for Storage Direct SSMS plug-in, the Database Restore > Monitor page displays the restore script and status.

The following figure shows the restore information and status as it appears on the Monitor page.

Figure 38 Storage Direct - Database Restore-Monitor page

Note: For information about the success or failure of the restore operation, review the log files that are located in the installation folder at \DPSAPPS\MSAPPAGENT\logs. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restore SQL Server databases using the Storage Direct restore command To restore SQL Server databases, run the following command:

msagentrc.exe -A "NSR_RESTORE_TYPE=regular [ ]

In command syntax, the parameters enclosed in square brackets are optional.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 199

Syntax for database restores with RecoverPoint

Use the msagentrc.exe command with the following syntax for Storage Direct with RecoverPoint restore operations:

msagentrc.exe -c A "RP_MGMT_HOST= " -A "NSR_DFA_SI_DD_HOST= " - A "NSR_DFA_SI_DD_HOST= " -A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A "NSR_RESTORE_TYPE=regular -A "RESTORE_DEVICE_GROUP= " - A "RESTORE_DEVICE_POOL= " [ ] -I - -t

where:

-c

Specifies the client name that was used for the backup.

-A "RP_MGMT_HOST= "

Specifies the name of the RecoverPoint management host.

-A "RP_USER= "

Specifies the username of the RecoverPoint management host. Full credentials are retrieved from the lockbox to authenticate with the host.

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain server that contains the backup. When you have a remote (secondary) Data Domain server that has replicated databases to restore, type the name of the secondary server. A Data Domain user on the secondary Data Domain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-A "NSR_RESTORE_TYPE=regular

Specifies to perform a database level restore.

-A "RESTORE_DEVICE_GROUP= "

Specifies the restore device pool that contains the vdisk devices that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device pool.

-A "RESTORE_DEVICE_POOL= "

Specifies the restore device group that contains the vdisk devices and the restore device pool that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device group.

-t

Restoring Storage Direct Backups

200 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Specifies the path to the objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 34 Restore command with RecoverPoint

msagentrc.exe -A "RESTORE_DEVICE_POOL=ledmf112_restore_pool" -A "RESTORE_DEVICE_GROUP=DG_ledmf112_restore" -c ledmf158.msapp.com -A "NSR_DFA_SI_DD_HOST=ledmd035.lss.example.com" -A "NSR_DFA_SI_DD_USER=DD163_user" -A "NSR_DFA_SI_DEVICE_PATH=/ SU_DD163" -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS \common\lockbox" -A "RP_MGMT_HOST=ledmd163.lss.example.com" -A "RP_USER=admin" -A NSR_RESTORE_TYPE=regular -I - -t 1462787749 -A ADDITIONAL_RESTORES=no -A RENAME_TO=dbtest5 APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3\ -t 1462787748 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest2\ -t 1462787747 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter \LEDMF158\dbtest1\

Syntax for database restores with VMAX

Use the msagentrc.exe command with the following syntax for Storage Direct with VMAX restore operations:

msagentrc.exe -c -A "NSR_DFA_SI_DD_HOST= " - A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A "NSR_RESTORE_TYPE=regular -A "VMAX_FASTX_RESTORE_SG= " - A "RESTORE_DEVICE_GROUP= " -A

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 201

"RESTORE_DEVICE_POOL= " [ ] -I - -t

where:

-c

Specifies the client name that was used for the backup.

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain server that contains the backup. When you have a remote (secondary) Data Domain server that has replicated databases to restore, type the name of the secondary server. A Data Domain user on the secondary Data Domain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-A "NSR_RESTORE_TYPE=regular

Specifies to perform a database level restore.

"VMAX_FASTX_RESTORE_SG= "

Specifies the restore storage group name of the VMAX array that your setup uses for Storage Direct for VMAX. The default value is NsrSnapSG.

-A "RESTORE_DEVICE_GROUP= "

Specifies the restore device pool that contains the vdisk devices that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device pool.

-A "RESTORE_DEVICE_POOL= "

Specifies the restore device group that contains the vdisk devices and the restore device pool that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device group.

-t

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Specifies the path to the objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3"

Restoring Storage Direct Backups

202 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 35 VMAX restore command example

ddbmsqlrc.exe -c NMMDA241.heroines.local -A "NSR_RESTORE_TYPE=regular -a "NSR_DFA_SI_DD_HOST=10.31.77.27" -a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/heroines" "MSSQL$SqlInst1:database1" "MSSQL$SqlInst1:database2" "VMAX_FASTX_RESTORE_SG=restoregroup1" -A "RESTORE_DEVICE_GROUP=group1" -A "RESTORE_DEVICE_POOL=pool1" -I - -t 1462787749 -A ADDITIONAL_RESTORES=no -A RENAME_TO=dbtest5 -A "RELOCATE_TO='E:\MSSQL12.INST1\MSSQL\DATA \Customers.mdf'='F:\NewData', 'E:\MSSQL12.INST1\MSSQL\DATA \Customers_log.ldf'='G:\NewLogs' APPLICATIONS:\SqlServerWriter \LEDMF158%5CINST1\dbtest3\ -t 1462787748 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LEDMF158%5CINST1\dbtest2\ -t 1462787747 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LEDMF158%5CINST1\dbtest1\

Optional parameters for database-level restores with the msagentrc.exe command

You can use the following optional parameters with the msagentrc.exe command.

-A "NSR_DFA_SI_DD_LOCKBOX_PATH= "

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

-A "ADDITIONAL_RESTORES={yes | no}"

Specifying yes disables the ability to roll back uncommitted transactions and uses the database to restore the latest or additional transaction logs. The default value is no.

-A "RENAME_TO= "

Specifies the new name for the destination database. The selected database will be restored to the new database. The new name of the database must be a valid SQL database name. If the destination contains a database with the same name as the database that you have specified, the restore operation overwrites the existing database. The database files that are data files (.mdf and .ndf) and log file (.ldf) will be restored to their source locations only. If the source database exists, its files can be in use. So, to avoid conflicts for using a new database name, use the -A RELOCATE_TO option along with the -A RENAME_TO option.

-A "INSTANCE_TO= \ "

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 203

Performs a redirected restore operation to a SQL Server instance that is different from the source instance where the backup was taken.

Note: The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host.

-A "RELOCATE_TO=' '='destination_folder-1', ' '='destination_folder-2',[...]"

Performs redirected restores of the database files that are data files (.mdf and .ndf) and log file (.ldf). You can rename or change only the destination folders, but not the filenames. Ensure that the destination paths are not root drives, for example, E:\.

-A "NSR_SQL_RECOVER_MODE= "

Performs a redirected restore to the specified path.

-A "NSR_SQL_TARGET_DIR= "

Specifies the destination path, to which you want to copy the restored files. You can then manually either move the files to the required folder or attach the files to a SQL Server instance. Ensure that the destination path is not a root drive, for example, E:\.

-D

Generates detailed logs that you can use to troubleshoot the restore issues. The supported debug levels are 1 through 9.

-A "DELETE_DEBUG_LOG_DAYS= "

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Note: This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Restore SQL Server databases with T-SQL scripts The Microsoft application agent for Storage Direct enables you to generate SQL-CLR script that you can use to restore SQL Server databases.

The SQL-CLR restore command is protectpoint_run_restore.

You must provide a VARCHAR type parameters to this command. The protectpoint_run_restore command uses the same command options as the msagentrc.exe command. Optional parameters for database-level restores with the msagentrc.exe command on page 203 provides information about the restore command options.

You can use any SQL Server standard interfaces such as, the SQL Server Management Studio Query window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL restore script

USE [master] GO DECLARE @returnCode int DECLARE @stdin NVARCHAR(MAX) SET @stdin = '-t 1465210308 -A ADDITIONAL_RESTORES=no -A RENAME_TO=dbtest3 -A "RELOCATE_TO='E:\MSSQL12.MSSQLSERVER00001\MSSQL

Restoring Storage Direct Backups

204 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

\DATA\Customers.mdf'='F:\NewData', 'E:\MSSQL12.MSSQLSERVER00001\MSSQL \DATA\Customers_log.ldf'='G:\NewLogs' "APPLICATIONS:\SqlServerWriter \LEDMF176%5CMSSQLSERVER00001\TestDB1\"' + CHAR(10) + '-t 1465210307 -A ADDITIONAL_RESTORES=no "APPLICATIONS:\SqlServerWriter \LEDMF176%5CMSSQLSERVER00001\dbtest2\"' + CHAR(10) + '-t 1465210306 -A ADDITIONAL_RESTORES=no "APPLICATIONS:\SqlServerWriter \LEDMF176%5CMSSQLSERVER00001\dbtest1\"' + CHAR(10); EXEC @returnCode = dbo.protectpoint_run_restore ' -A "RESTORE_DEVICE_POOL=ledmf098_restore_pool_1" -A "RESTORE_DEVICE_GROUP=ledmf098_DG2" -c ledmf176.msapp.com -A "NSR_DFA_SI_DD_HOST=ledmd035.lss.example.com" -A "NSR_DFA_SI_DD_USER=DD163_user" -A "NSR_DFA_SI_DEVICE_PATH=/SU_DD163" -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common \lockbox" -A NSR_RESTORE_TYPE=regular -I -', @stdin IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Performing rollback restores The Microsoft application agent for Storage Direct with SQL Server supports multiple tools to roll back volumes.

You can roll back volumes using the Microsoft application agent SQL Server Management Studio plug-in (GUI), Microsoft application agent for Storage Direct commands, or T-SQL scripts.

Considerations for rollback restores Consider the following information before you perform a volume restore:

l You can restore volumes only to the local host.

l The volumes that you selected for the restore must belong to the same consistency group. You can resynchronize the restored volumes only with the source volumes that were backed up.

l If you delete bookmarks or static images on RecoverPoint or Data Domain without using the Microsoft application agent, the deleted backups still appear on the Volume Restore tab of the Microsoft app agent for Storage Direct plug-in, but the restore operations fail and a relevant message appears.

l In the case of VMAX, if you have selected the latest version of a save set or backup to restore, the Microsoft application agent restores the save set or backup from VMAX. If you have selected any version other than the latest version of a save set or backup to restore, the Microsoft application agent restores the save set or backup from Data Domain.

l If you are relocating a volume to an alternate VMAX LUN, review the information in Relocating volumes to an alternate LUN during a VMAX rollback restore on page 205 before configuring the restore operation.

Relocating volumes to an alternate LUN during a VMAX rollback restore The Microsoft application agent supports restoring a volume to an alternate VMAX LUN.

You can restore a volume to an alternate LUN that is part of the original VMAX array or part of a different VMAX array.

When you restore a volume to an alternate location, the destination volume must have an identical file structure to the source volume, including the file system and directory path, names of the files, and location of the files across the volumes.

Restoring the backup to a volume that was deleted and re-created on the same LUN is considered an alternate LUN restore and the same path requirements apply.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 205

Note: Relocating a volume to an alternate VMAX LUN is not supported in an environment where application data resides on multiple VMAX storage arrays on the same site. You must restore the backup using the original source VMAX LUN.

The following additional requirements apply when relocating a volume to an alternate LUN on a VMAX array that is different from the original array:

l The Data Domain restore devices must already be encapsulated on the alternate VMAX array.

l The alternate VMAX array must be connected to the original Data Domain system, and you must restore the backup from Data Domain.

Perform rollback restores with the Microsoft app agent for Storage Direct SSMS plug-in

About this task

The Script view is available in each page, which generates a command prompt equivalent script, which you can use to create a .bat file to perform scheduled backups, automation, and other tasks.

l CLI Scripts: To generate the command script, which you can use to run a restore operation from the command prompt.

l T-SQL Scripts: To generate a backup script in the T-SQL format. You can use the T-SQL scripts to restore SQL Server by using the Microsoft application agent for Storage Direct.

Launch the Microsoft app agent for Storage Direct SSMS plug-in

To open the Microsoft app agent for Storage Direct SSMS plug-in, from the Windows desktop, click Start > Microsoft SQL Server Management Studio > Microsoft app agent for Storage Direct.

NOTICE If you have not installed SSMS, to start the Microsoft app agent for Storage Direct SSMS plug-in, run the DDSSMSAddinApp.exe pp command from the \DPSAPPS\MSAPPAGENT\bin folder.

Configure general volume restore settings To configure SQL volume restores with the Microsoft app agent for Storage Direct SSMS plug-in, you must first specify general restore options on the Volume Restore > General page.

Procedure

1. Open the Microsoft app agent for Storage Direct plug-in to the Volume Restore > General page.

The Volume Restore page appears as shown in the following figure.

Restoring Storage Direct Backups

206 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 39 Storage Direct - Volume Restore page

2. Click the Data Domain Server browse button to select the Data Domain server and the storage unit to restore either SQL Server instance or required databases.

A storage unit contains the backed up SQL Server hosts. Note: In the case of a remote (secondary) Data Domain server that has replicated databases to restore, select the relevant server. A Data Domain user on the secondary Data Domain server must be in the same group as the primary Data Domain server.

3. Use the SQL Server host list to select a SQL Server host to restore the required databases.

A SQL Server host contains the backed up stand-alone SQL Server instances and the corresponding databases.

4. Use the Start browsing from list to select a backup save time, and then click Show Versions.

The backups that were performed within the specified save time appear in the save sets table.

5. Start browsing from: Specify a backup save time and click Show Versions.

All the backups that were performed within the specified save time appear in the save sets table.

6. Select the appropriate SQL Server instance in the save sets table.

The selected instance and databases contained in that instance appear in the databases table.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 207

7. In the databases table, perform the following steps:

a. Select the databases that you want to include in the volume restore.

Note: Consider the following information for RecoverPoint:

l For RecoverPoint 5.0 or later, the Microsoft application agent supports partial (subset of databases) restore of a consistency group. From the databases table, you can select the required databases to restore.

l For RecoverPoint version earlier than 5.0, the checkboxes in the databases table are read-only because the Microsoft application agent does not support partial restore of a consistency group.

b. In the Restore To column, use the drop-down list to select location where you want to recover the databases.

The original source location is selected by default but you can restore the backup to an alternate location.

Note: The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host.

8. To start the volume restore, click Run.

View files in the backup To view the files that are in the backup, open the Volume Restore > Files page.

Procedure

1. From the left panel, click Files.

The Files page appears as shown in the following figure.

Restoring Storage Direct Backups

208 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 40 Storage Direct - Volume Restore-Files page

2. Review the information in the files table about what files are included in the backup and the database and volume where each file resides.

3. To start the restore operation, click Run.

Configure volume restore options When you configure SQL volume restores with the Microsoft app agent for Storage Direct SSMS plug-in, you can specify additional restore options on the Volume Restore > Options page.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 209

Figure 41 Storage Direct - Volume Restore-Options page

2. For RecoverPoint, to select a RecoverPoint appliance to restore the SQL Server instance, click the browse button beside the Management Server field, and then browse and select the RecoverPoint appliance.

3. For VMAX, in the Storage Group field, type the restore storage group name of the VMAX array where the restore FTS devices are assigned to the host.

The default value is NsrSnapSG.

4. For VMAX, to restore from Data Domain even if the snapshot is available on the local VMAX array, select Restore from Data Domain even if there is a local VMAX snapshot available.

Note: To mount the static image, and restore data directly from Data Domain, ensure that you have masked the FTS restore devices to the application host. The VMAX documentation provides information about how to mask the FTS devices.

5. To generate detailed logs, which you can use to troubleshoot the restore issues, select Select a debug level. Specify a value of 1 through 9. The default value is 0 (zero).

6. To delete debug logs older than a certain number of days, specify the number of days with a number between 1 and 32767 days in the Delete debug logs after field. The default value is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Restoring Storage Direct Backups

210 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

7. To leave the database in an operational state by rolling back uncommitted transactions, select Restore with NORECOVERY

Additional transaction logs cannot be restored.

8. To enable a confirmation message before the volume is restored, select Require confirmation before restoring volumes.

The following prompt appears when you start the restore operation.

Performing a volume restore will completely replace the contents of the affected volumes with their backed up versions. Do you want to proceed?

9. To start the volume restore, click Run.

Monitor the volume restore operation After a volume restore operation is run from the Microsoft app agent for Storage Direct SSMS plug-in, the Volume Restore > Monitor page displays the restore script and status.

The following figure shows the restore information and status as it appears on the Monitor page.

Figure 42 Storage Direct - Volume Restore-Monitor page

If the restore succeeds, the Restore completed message appears. Otherwise, the Restore failed message appears.

Note: Review the log files that are available in the \DPSAPPS

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 211

\MSAPPAGENT\logs folder for information about the success or failure of the restore. The typical location is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Perform rollback restores with the Storage Direct restore command To restore SQL Server volumes, run the following command:

msagentrc.exe -A "NSR_RESTORE_TYPE=lunresync" [ ]

Syntax for rollback restores with RecoverPoint

Use the msagentrc.exe command with the following syntax for Storage Direct with RecoverPoint volume restore operations:

msagentrc.exe -c -A "NSR_DFA_SI_DD_HOST= " - A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A "NSR_RESTORE_TYPE=lunsync -A "RP_MGMT_HOST= " -A "RP_USER= [ ] -I - -t

where:

-c

Specifies the client name that was used for the backup.

-A "RP_MGMT_HOST= "

Specifies the name of the RecoverPoint management host.

-A "RP_USER= "

Specifies the username of the RecoverPoint management host. Full credentials are retrieved from the lockbox to authenticate with the host.

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain server that contains the backup. When you have a remote (secondary) Data Domain server that has replicated databases to restore, type the name of the secondary server. A Data Domain user on the secondary Data Domain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-A "NSR_RESTORE_TYPE=lunresync"

Specifies to perform a volume-level rollback restore.

-t

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Restoring Storage Direct Backups

212 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the path to the objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 36 Example RecoverPoint rollback restore command

msagentrc.exe -A "RESTORE_DEVICE_POOL=ledmf112_restore_pool" -A "RESTORE_DEVICE_GROUP=DG_ledmf112_restore" -c ledmf158.msapp.com -A "NSR_DFA_SI_DD_HOST=ledmd035.lss.example.com" -A "NSR_DFA_SI_DD_USER=DD163_user" -A "NSR_DFA_SI_DEVICE_PATH=/ SU_DD163" -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS \common\lockbox" -A "RP_MGMT_HOST=ledmd163.lss.example.com" -A "RP_USER=admin" -A "NSR_RESTORE_TYPE=lunresync" -I - -t 1462787749 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LEDMF158%5CINST1\dbtest3\ -t 1462787748 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LEDMF158%5CINST1\dbtest2\ -t 1462787747 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LEDMF158%5CINST1\dbtest1\

Syntax for rollback restores with VMAX

Use the msagentrc.exe command with the following syntax for Storage Direct with VMAX volume restore operations:

msagentrc.exe -c -A "NSR_DFA_SI_DD_HOST= " - A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A "NSR_RESTORE_TYPE=lunsync [ ] -I - -t

where:

-c

Specifies the client name that was used for the backup.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 213

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain server that contains the backup. When you have a remote (secondary) Data Domain server that has replicated databases to restore, type the name of the secondary server. A Data Domain user on the secondary Data Domain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-A "NSR_RESTORE_TYPE=lunresync"

Specifies to perform a volume-level rollback restore.

-t

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Specifies the path to the objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Optional parameters for rollback restores with the msagentrc.exe command

You can use the following optional parameters with the msagentrc.exe command.

-A "NSR_DFA_SI_DD_LOCKBOX_PATH= "

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

Restoring Storage Direct Backups

214 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

-A "ADDITIONAL_RESTORES={yes | no}"

Specifying yes disables the ability to roll back uncommitted transactions and uses the database to restore the latest or additional transaction logs. The default value is no.

-A "RENAME_TO= "

Specifies the new name for the destination database. The selected database will be restored to the new database. The new name of the database must be a valid SQL database name. If the destination contains a database with the same name as the database that you have specified, the restore operation overwrites the existing database. The database files that are data files (.mdf and .ndf) and log file (.ldf) will be restored to their source locations only. If the source database exists, its files can be in use. So, to avoid conflicts for using a new database name, use the -A RELOCATE_TO option along with the -A RENAME_TO option.

-A "INSTANCE_TO= \ "

Performs a redirected restore operation to a SQL Server instance that is different from the source instance where the backup was taken.

Note: The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host.

-A "RELOCATE_TO=' '='destination_folder-1', ' '='destination_folder-2',[...]"

Performs redirected restores of the database files that are data files (.mdf and .ndf) and log file (.ldf). You can rename or change only the destination folders, but not the filenames. Ensure that the destination paths are not root drives, for example, E:\.

-D

Generates detailed logs that you can use to troubleshoot the restore issues. The supported debug levels are 1 through 9.

-A "RESTORE_FROM_DD_ONLY={true | false}"

For VMAX environments, specify true to restore from Data Domain even if the snapshot is available locally on the VMAX array.

-A "DELETE_DEBUG_LOG_DAYS= "

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Note: This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Restore SQL Server volumes with T-SQL scripts The Microsoft application agent for Storage Direct enables you to generate SQL-CLR script that you can use to restore SQL Server volumes.

The SQL-CLR volume restore command is the same as the database restore command, that is, protectpoint_run_restore.

However to perform volume restores, you must specify the value of the NSR_RESTORE_TYPE option as lunresync.

You must provide a VARCHAR type parameters to the protectpoint_run_restore command.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 215

You must provide a VARCHAR type parameters to this command. The protectpoint_run_restore command uses the same command options as the msagentrc.exe command. Optional parameters for rollback restores with the msagentrc.exe command on page 214 provides information about the restore command options.

You can use any SQL Server standard interfaces such as, the SQL Server Management Studio Query window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL volume level or LUN level restore script

USE [master] GO DECLARE @returnCode int DECLARE @stdin NVARCHAR(MAX) SET @stdin = '-t 1465211083 -A ADDITIONAL_RESTORES=no APPLICATIONS: \SqlServerWriter\' + CHAR(10); EXEC @returnCode = dbo.protectpoint_run_restore ' -c ledmf176.msapp.com -A "NSR_DFA_SI_DD_HOST=ledmd035.lss.example.com" -A "NSR_DFA_SI_DD_USER=DD163_user" -A "NSR_DFA_SI_DEVICE_PATH=/SU_DD163" -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common \lockbox" -A "RP_MGMT_HOST=ledmd163.lss.example.com" -A "RP_USER=admin" -A "NSR_RESTORE_TYPE=lunresync" -I -', @stdin IF @returnCode <> 0 BEGIN RAISERROR ('Fail!', 16, 1) END

Confirming the status of a rollback restore Procedure

1. Open the msagentsv.log log file from the following path:

\DPSAPPS\MSAPPAGENT\logs 2. Verify that the following messages are appear in the log file:

Starting LUN resync. Waiting for LUN resync to finish.

Note: The debug level specified for the backup must be set to level 3 or higher for these messages to appear.

Restore an availability group to an alternate instance The Microsoft application agent supports restoring an availability group backup to an alternate instance for both database and volume level restore operations.

Before you begin

A backup must exist of the availability group using the Windows cluster name as the hostname.

About this task

Note: Multiple availability group databases can be restored to an alternate instance only through a volume level restore.

Procedure

1. On the primary node, perform the following steps:

Restoring Storage Direct Backups

216 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

a. Launch the Microsoft application agent SQL Server Management Studio (SSMS) plugin.

b. Configure a restore operation of availability group databases from either the Database Restore or Volume Restore tab using the Windows cluster name in the SQL Server host field.

c. Specify the alternate target location using one of the following methods:

l From the Database Restore tab, use the Instance drop-down list.

l From the Volume Restore tab, use the drop-down list beside each database in the Restore To column.

Note: The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host. For volume restores, the target instance must match the file system layout as the source instance.

d. Run the restore operation.

2. On each of the secondary nodes, perform the following steps:

a. Launch the Microsoft application agent SSMS plugin.

b. Configure a restore operation of availability group databases from either the Database Restore or Volume Restore tab with the following selections:

l Select the Windows cluster name in the SQL Server host field.

l On the Options page, in the Recovery state drop-down list, select RESTORE WITH NORECOVERY.

c. Specify the same alternate target location that was configured on the primary node using one of the following methods:

l From the Database Restore tab, use the Instance drop-down list.

l From the Volume Restore tab, use the drop-down list beside each database in the Restore To column.

d. Run the restore operation.

e. Repeat these steps on each secondary node.

3. On the primary node, launch the SSMS Availability Group Wizard.

4. Use with the Availability Group Wizard to add the restored databases to the availability group using the Join only option.

Restoring SQL Server table-level data The Microsoft application agent supports table-level recovery of SQL Server data using the Storage Direct SSMS plug-in or Storage Direct commands.

Note: The Microsoft application agent does not support T-SQL scripts to perform table restores.

Restore SQL Server table-level data with the Microsoft app agent for Storage Direct SSMS plug-in

Before you begin

Ensure that you have installed ItemPoint to perform table restores. Otherwise, the Table Restore tab does not appear in the Microsoft app agent for Storage Direct SSMS plug-in.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 217

About this task

The Script view is available in each page, which generates a command prompt equivalent script, which you can use to create a .bat file to perform scheduled backups, automation, and other tasks.

Launch the Microsoft app agent for Storage Direct SSMS plug-in

To open the Microsoft app agent for Storage Direct SSMS plug-in, from the Windows desktop, click Start > Microsoft SQL Server Management Studio > Microsoft app agent for Storage Direct.

NOTICE If you have not installed SSMS, to start the Microsoft app agent for Storage Direct SSMS plug-in, run the DDSSMSAddinApp.exe pp command from the \DPSAPPS\MSAPPAGENT\bin folder.

Configure general table restore settings To configure SQL table-level restores with the Microsoft app agent for Storage Direct SSMS plug- in, you must first specify general restore options on the Table Restore > General page.

Before you begin

To restore a database that is part of the Always On availability group, you must first remove the database from the Always On availability group before configuring the restore operation. After the restore is complete, add the database back to the Always On availability group.

Procedure

1. Open the Microsoft app agent for Storage Direct window to the Table Restore > General page.

The General page appears as shown in the following figure.

Restoring Storage Direct Backups

218 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 43 Storage Direct - Table Restore General page

2. Click the browse button beside Data Domain Server to select the Data Domain server and the storage unit to restore either SQL Server instance or required databases.

A storage unit contains the backed up SQL Server hosts. Note: In the case of a remote (secondary) Data Domain server that has replicated databases to restore, select the relevant server. A Data Domain user on the Data Domain server must be in the same group as the primary Data Domain server.

3. Use the SQL Server host list to select a SQL Server host to restore the required databases.

A SQL Server host contains the backed up SQL Server instances, and the corresponding databases.

4. Use the Start browsing from list to select a backup save time, and then click Show Versions.

The backups that were performed within the specified save time appear in the save sets table.

5. Use the SQL Server Instance list to select the name of the SQL Server instance that contains the database.

A SQL Server instance contains databases and can be either stand-alone or cluster.

The corresponding databases appear in the databases table that is below the SQL Server Instance field.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 219

6. From the databases table, select the database that contains the tables that you want to restore.

The corresponding save sets appear in the save sets table.

7. In the save sets table, select the save set that contains the tables that you want to restore.

8. To mount the database, click Run.

Configure optional table restore settings When you configure SQL table-level restores with the Microsoft app agent for Storage Direct SSMS plug-in, you can specify optional restore settings on the Table Restore > Options page.

About this task

All settings on the Options page are optional.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure. Figure 44 Microsoft app agent for Storage Direct: Table Restore-Options page

2. Under Mount, specify the following fields as required:

l The Mount Folder field specifies the location where backup images are mounted. You cannot edit the value in this field.

l Select Do not run ItemPoint after mounting the backup images if you do not want ItemPoint GUI to launch after you run the mount operation. Selecting this option disables the Leave backup images mounted after ItemPoint exits option, and enables you to perform manual table-level restores.

Restoring Storage Direct Backups

220 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l To leave the backup images in the mounted state after you close ItemPoint, select Leave backup images mounted after ItemPoint exits. This option is enabled only if you have not selected the Do not run ItemPoint after mounting the backup images option.

You can manually browse the backup images, inspect the images, and then dismount the images by using the msagentadmin.exe dismount command. Dismount backup images with the msagentadmin dismount command on page 228 provides information.

3. To generate detailed logs, which you can use to troubleshoot the restore issues, select Select a debug level, and then specify a value of 1 through 9. The default value is 0 (zero).

4. To delete debug logs older than a certain number of days, select Delete debug logs after, and then specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

5. To limit the backup history of the databases on the General page to a set number of days, type or select a number in the Days of backup history field.

The default value is 30.

6. To use the client name that is provided as-is without converting it to the fully qualified domain name (FQDN), select Exclude client name resolution.

Use this option to restore backups taken with Microsoft application agent version 4.5 or earlier that use the short name as the client name.

7. Under Restore Method, specify the details for the device that you want the restore operation to use:

l For VMAX environments, to restore with a FAST.X restore device, perform the following steps:

a. From the Restore with menu, select FAST.X (VMAX only).

b. In the Storage Group field, type the name of the VMAX FAST.X restore storage group where the restore FTS devices are assigned to the host. The default value is NsrSnapSG.

c. In the Static Image Pool field, type the name of the static image pool when restoring from a secondary Data Domain. This field is populated by default for restores from the primary Data Domain.

d. If you want to restore from a backup older than the latest backup, select Ignore local snapshots. By default, the restore operation uses the local snapshot copy on the VMAX array, when available. The local snapshot is the latest available backup. To restore from any backup older than the latest snapshot copy, you must select this option.

l To restore with a Data Domain vdisk device, perform the following steps:

a. From the Restore with menu, select Data Domain vdisk.

b. In the Device Pool field, type the name of the vdisk restore device pool that contains the vdisk devices that you want use to perform the restore operation. Ensure that the device pool belongs to the Data Domain server that you have selected on the General page.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 221

c. In the Device Group field, type the name of the restore device group that contains the vdisk devices and the restore device pool that you want to use to perform the restore operation. Ensure that device group belongs to the Data Domain server that you have selected on the General page.

Note: To mount VMAX static images and restore the data directly from Data Domain, ensure that the vdisk devices are masked to the application host. The Data Domain documentation provides information.

d. In the Static Image Pool field, type the name of the static image pool.

8. To mount the database, click Run.

Monitor the mount operation After a table restore mount operation is run from the Microsoft app agent for Storage Direct SSMS plug-in, the Table Restore > Monitor page displays the mount script and status.

The following figure shows the mount information and status as it appears on the Monitor page.

Figure 45 Storage Direct - Table Restore-Monitor page

Note: Review the log files that are available in the \DPSAPPS\MSAPPAGENT\logs folder for information about the success or failure of the mount and the dismount. The default location is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restoring Storage Direct Backups

222 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

When the mount operation succeeds, ItemPoint for Microsoft SQL Server GUI launches, unless you select the Do not run ItemPoint after mounting the backup images option when you configure the mount operation.

Restore table-level data using ItemPoint After the backup images are mounted using the Microsoft application agent SSMS plug-in, complete the table-level restore using ItemPoint for Microsoft SQL Server.

Before you begin

Configure and run the table level restore operation with the Table Restore tab in the Microsoft application agent SSMS plug-in.

About this task

Once the table level restore is configured and run through the Microsoft application agent SSMS plug-in, ItemPoint launches.

If you select Do not run ItemPoint after mounting the backup images when you configure the table level restore, you must manually launch ItemPoint, and then launch the Data Wizard.

Procedure

1. On the Select Source page, select the source backup files from the mounted volume that contains the SQL backup data as shown in the following figure, and then click Next.

Figure 46 ItemPoint Data Wizard: select the source files

2. On the Select Target Server page, specify the details and login credentials for the target SQL Server and database.

The following figure shows the ItemPoint Data Wizard Select Target Server page:

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 223

Figure 47 ItemPoint Data Wizard: select the target server

3. Click Finish.

The Data Wizard closes and ItemPoint loads the tables contained in the source backup files.

4. Use ItemPoint to browse and restore the individual tables.

Note: The PowerProtect ItemPoint for Microsoft SQL Server User Guide provides more information on using ItemPoint for Microsoft SQL Server to restore table-level data.

5. To dismount the mounted backup images, exit ItemPoint for Microsoft SQL Server.

Note: If you select Leave backup images mounted after ItemPoint exits or Do not run ItemPoint after mounting the backup images when you configure the mount operation, the backup image remains mounted for 4 hours. To dismount the backup manually, use the msagentadmin command.

Restore SQL Server table-level data with Storage Direct commands You can restore SQL Server table-level data by mounting backups with Storage Direct mount command, and then restoring the tables with ItemPoint for Microsoft SQL Server.

Mount the backup images

Run the following command to mount backup images:

msagentrc.exe -A NSR_RESTORE_TYPE=mount -A "RESTORE_DEVICE_POOL= " -A "RESTORE_DEVICE_GROUP= " -c -A "NSR_DFA_SI_DD_HOST= " -A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -I - -t

where:

-A NSR_RESTORE_TYPE=mount

Specifies a mount operation

-A "RESTORE_DEVICE_POOL= "

Restoring Storage Direct Backups

224 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the restore device group that contains the vdisk devices and the restore device pool that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device group.

-A "RESTORE_DEVICE_GROUP= "

Specifies the restore device pool that contains the vdisk devices that you use to perform the restore operation. Ensure that the Data Domain server that you have specified belongs to this device pool.

-c

Specifies the client name that was used for the backup.

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain server that contains the backup. When you have a remote (secondary) Data Domain server that has replicated databases to restore, type the name of the secondary server. A Data Domain user on the secondary Data Domain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-t

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Specifies the path to the objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 225

Example 37 Mount backup command example

msagentrc.exe -A "RESTORE_DEVICE_POOL=msagent-restore-pool" -A "RESTORE_DEVICE_GROUP=lfcp1018-restore.dg" -c lfcp1018.msappagentqa.com -A "NSR_DFA_SI_DD_HOST=lfcp0023.lss.emc.com" -A "NSR_DFA_SI_DD_USER=rpuser" -A "NSR_DFA_SI_DEVICE_PATH=/appagent- backup" -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS \common\lockbox" -A NSR_RESTORE_TYPE=mount -I - -t 1463148949 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\LFCP1018%5CMSSQLSERVER1\userDB01\

Restore table-level data using ItemPoint Procedure

1. Launch the command prompt.

2. Run the following command:

C:\Program Files (x86)\DPSAPPS\MSAPPAGENT\ItemPoint\Sql\EMCIPSQL.exe

The ItemPoint for Microsoft SQL Server appears.

3. Launch the Data Wizard.

The Data Wizard appears to the Select Source page.

4. On the Select Source page, select the source backup files from the mounted volume that contains the SQL backup data as shown in the following figure, and then click Next.

Figure 48 ItemPoint Data Wizard: select the source files

5. On the Select Target Server page, specify the details and login credentials for the target SQL Server and database.

The following figure shows the ItemPoint Data Wizard Select Target Server page:

Restoring Storage Direct Backups

226 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 49 ItemPoint Data Wizard: select the target server

6. Click Finish.

The Data Wizard closes and ItemPoint loads the tables contained in the source backup files.

7. Use ItemPoint to browse and restore the individual tables.

Note: The PowerProtect ItemPoint for Microsoft SQL Server User Guide provides more information on using ItemPoint for Microsoft SQL Server to restore table-level data.

After you finish

Dismount the backups using the msagentadmin.exe command.

Managing mounted backups The Microsoft application agent supports command line tools to list and dismount mounted backups.

List mounted backups with the msagentadmin command

To list mounted backups, run the following command:

msagentadmin mounts --ddhost " " --ddpath " " --dduser " " [ ]

where:

--ddhost " "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

--ddpath "/ "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 227

Dismount backup images with the msagentadmin dismount command

To dismount the backup images after the restore completes, run the following command:

msagentadmin dismount --ddhost " " --ddpath " " --dduser " " [ ]

where:

dismount

Specifies an operation to dismount backups.

--ddhost " "

Specifies the name of the Data Domain server that contains the storage unit, to which you backed up the databases.

--ddpath "/ "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

Example 38 Dismount command

msagentadmin.exe dismount --ddhost "ledmd035.lss.example.com" -- dduser "DD163_user" --ddpath "/SU_DD163" --lockbox "C:\Program Files \DPSAPPS\common\lockbox"

Example 39 Dismount command using a configuration file

msagentadmin.exe dismount --config c:\temp\config_pp.txt

Optional parameters to manage mounted backups with msagentadmin

The following list describes the optional parameters for managing mounted backups with the msagentadmin command:

--deleteDebugLog

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large. This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

--debug

Specifies the debug level for listing backups. The default value is 0 (zero). You can use the -D alias for the --debug parameter.

--help

Restoring Storage Direct Backups

228 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Prints a brief help message. You can use the -h alias for the --help parameter.

--config " "

Specifies the full path to the configuration file. You can use the -z alias for the --config parameter.

--lockbox

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

--bybackupid

Specifies to display the backup ID for mounted backups.

--bypath

Specifies to display the mount path for mounted backups.

--byssid

Specifies to display the save set IDs for mounted backups.

Performing SQL Server disaster recovery with Storage Direct About this task

Perform the following steps on the new disaster recovery host.

Procedure

1. On the new disaster recovery host, install and configure SQL Server.

2. Create the same SQL Server instances that existed before the disaster.

3. According to your setup, mask the restore FTS devices or vdisk devices to the application (disaster recovery) host to mount the static image.

4. Restore the image and the backed up save sets to the SQL Server instances that you have created.

5. After the restore completes, manually create the logs folder in the SQL Server installation folder, and start the SQL Server service.

Note: After the disaster recovery completes, the SQL Server service does not automatically start because the logs folder is not present in the SQL Server installation folder. The Microsoft application agent for Storage Direct with SQL Server backup operation does not back up the SQL Server installation logs folder even if the selected instance contains the logs folder.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 229

Restoring Storage Direct Backups

230 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 8

Restoring Virtual Machine Backups with vProxy Engine

This chapter includes the following sections:

l Overview of SQL Server virtual machine restore operations ...............................................232 l Prerequisites....................................................................................................................... 232 l Restrictions......................................................................................................................... 233 l Restoring SQL Server databases to a virtual machine......................................................... 233 l Performing SQL Server table-level recovery to a virtual machine........................................248 l Performing an instant access recovery............................................................................... 258

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 231

Overview of SQL Server virtual machine restore operations Use the Microsoft application agent tools to restore full and transaction log backups created by a PowerProtect virtual machine application-aware protection policy. The backups are restored to a SQL Server hosted on a VMware virtual machine.

When you add a SQL Server virtual machine asset to a PowerProtect virtual machine application- aware protection policy, the Microsoft application agent and ItemPoint are silently installed on the protected SQL Server.

The Microsoft application agent automatically stores the Data Domain or PowerProtect X400 host and login information from the protection settings that are configured in the PowerProtect protection policy. This automatic configuration occurs when the SQL Server virtual machine asset is added to the PowerProtect protection policy.

You can use the Microsoft app agent for vProxy Engine SQL Server Management Studio (SSMS) plug-in or the command prompt to perform the restore operations. T-SQL scripts are not supported with vProxy Engine.

The Microsoft application agent can perform a database restore, table-level restore, or database instant access restore to the source virtual machine or an alternate virtual machine. To perform restores to an alternate virtual machine, that virtual machine must be an asset of PowerProtect. However, instance-level restores can only be performed to the original source instance.

The Microsoft application agent supports both full backups and transaction log backups for a Microsoft Always On availability group (AAG). The AAG databases are indexed against the AAG cluster name. Full backups index the AAG database for all the AAG cluster nodes for one cycle of backup. Transaction log backups occur only on the preferred node. You may restore the AAG database to any copy. When you restore an AAG database for the purpose of adding back into the AAG, you may restore to any AAG database copy but first remove the database from the AAG, as required by Microsoft. Once the restore is complete, you must add the database back into the AAG and re-seed the replicas.

Prerequisites An environment must meet the following requirements for application-aware virtual machine restore operations:

l vCenter 6.5 and VMware ESXi 6.5 or later must be installed.

l VMware tools version 10.1 or later must be installed and running on the target virtual machine.

l The UUID attribute must be enabled in the vSphere Client (disk.EnableUUID=TRUE).

The following VMware Knowledge Base article provides instructions:

https://kb.vmware.com/s/article/52815

l The virtual machine must use SCSI disks only and the number of available SCSI slots must match the number of disks at a minimum.

For example, a virtual machine with 7 disks requires one SCSI controller but a virtual machine with 8 disks requires 2 SCSI controllers.

l The SQL Server instance must be up and running on the virtual machine.

l The SQL Server must be a stand-alone instance or part of an Always On availability group that is configured with file share witness.

l The SQL writer service must be running.

Restoring Virtual Machine Backups with vProxy Engine

232 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l The user account that is configured in the PowerProtect protection policy must have access to perform backup and recovery operations.

To configure the required permissions, perform the following steps on each protected SQL Server instance:

1. Create a SQL Login with the user account configured in the PowerProtect protection policy.

2. Add the user the sysadmin SQL Server role.

l The SQL Server to which the data will be restored must be hosted on a virtual machine that is a discovered asset of PowerProtect.

Note: If you are restoring data to an alternate location to a SQL Server virtual machine that is not protected in PowerProtect, you must manually install the Microsoft application agent on the target virtual machine before you can restore the data. The PowerProtect Microsoft Application Agent Installation Guide provides instructions to install the Microsoft application agent for vProxy Engine. When you configure the restore operation, you must manually register the Data Domain or PowerProtect X400 server, PowerProtect appliance, and lockbox details.

Restrictions The following restrictions apply to the application-aware virtual machine operations:

l For vProxy Engine backup and restore operations, the Microsoft application agent does not support Failover Cluster Instances configured with shared disks, due to a VMware restriction on performing an image backup with a clustered shared disk.

The following VMware Knowledge Base article provides more information:

https://kb.vmware.com/s/article/1006392

l Windows authentication must be enabled, and the backup user must be properly configured.

l The Microsoft application agent does not support native SQL authentication.

l SQL 2017 clusterless AAG is not supported.

l You cannot protect the SQL host with both vProxy Engine (VM Direct) and Application Direct.

You cannot add a virtual machine to a PowerProtect application-aware protection policy when the virtual machine already has an application agent installed in Application Direct mode.

The installer fails when you try to install the Microsoft application agent on a system where the application agent is already installed and the selected installation mode does not match the currently installed product.

Restoring SQL Server databases to a virtual machine Learn how to restore Microsoft SQL Server database backups taken in a PowerProtect virtual machine application-aware protection policy.

You can restore database full and transaction log backups from the primary Data Domain or PowerProtect X400 system or from the secondary Data Domain or PowerProtect X400 system if replication is enabled for the PowerProtect protection policy. However, when you are restoring from the secondary Data Domain or PowerProtect X400 system, the tail-log backup option is not supported.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 233

Restoring a backup that was moved to the cloud using Data Domain Cloud Tier

An application-aware workflow supports application-aware full backups that are tiered to the cloud using Data Domain Cloud Tier. This support is available for Amazon Web Services (AWS) and Elastic Cloud Storage (ECS) profiles.

For a SQL database recovery from backups that have been tiered using an application-aware workflow, the backups must be recalled to the active tier before you perform the recovery.

When you try to restore a backup after an associated full backup has been moved to the cloud using Data Domain Cloud Tier, the restore operation fails with the following error message:

"reason" : "Missing or invalid value specified for property 'copyId'"

This error occurs when you try to restore either a full backup that has been tiered to the cloud or a tail-log backup when the associated full backup has been tiered to the cloud. For example, the following full and tail-log backups are performed at the specified times:

l FULL1: 10:00 a.m. (in cloud tier)

l TLOG1: 10:30 a.m.

l TLOG2: 11:00 a.m.

l FULL2: 11:15 a.m. (in active tier)

l TLOG4: 11:30 a.m.

l TLOG5: 12:00 p.m.

In this case, the restore of the FULL1, TLOG1, or TLOG2 backup fails with the error message because the FULL1 backup has been tiered to the cloud. The restore of the FULL2, TLOG4, or TLOG5 backup succeeds because the FULL2 backup is in the active tier.

To resolve this issue, contact the PowerProtect administrator to recall the associated full backup (FULL1 in this example) from the cloud tier to the active tier, and then perform the restore.

Restore SQL Server databases with the vProxy Engine SSMS plug-in Learn how to perform a vProxy Engine SQL Server database restore operation using the Microsoft app agent for vProxy Engine SSMS plug-in.

Launch the Microsoft app agent for vProxy Engine SSMS plug-in Procedure

1. From the Windows Start menu, select Microsoft SQL Server Management Studio.

2. In the Microsoft SQL Server Management Studio, in the Connect to Server window, specify the server information and credentials, and then click Connect.

3. In the toolbar, click Microsoft App Agent (vProxy Engine).

The Microsoft app agent for vProxy Engine window appears. Note: If the Microsoft App Agent (vProxy Engine) button is not on the toolbar, the plug-in may be unable to register. In this scenario, you can launch the plug-in directly from the start menu. From the Windows Start menu, select DDBMA Plugin for SQL Server Management Studio.

Restoring Virtual Machine Backups with vProxy Engine

234 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configure general database restore settings To configure SQL restores with the Microsoft app agent for vProxy Engine SSMS plug-in, you must first specify general restore options on the Database Restore > General page.

Procedure

1. Open the Microsoft app agent for vProxy Engine window to the Database Restore > General page.

The General page appears as shown in the following figure.

Figure 50 vProxy Engine: Database Restore General page

2. Beside Data Domain Server, click ...

The Data Domain Server List & Lockbox Settings window appears and lists the Data Domain or PowerProtect X400 server and lockbox that is configured in the PowerProtect protection policy. If the protection policy is configured for replication, the secondary Data Domain or PowerProtect X400 server and storage unit also appear.

3. In the Data Domain Server List & Lockbox Settings window, select the Data Domain or PowerProtect X400 server that contains the backup, and then click OK.

Note: If you are restoring the backup to an alternate virtual machine that is not protected in a PowerProtect protection policy, contact the PowerProtect administrator to retrieve the Data Domain or PowerProtect X400 host details for the protection policy associated with the original virtual machine. You must also request the PowerProtect administrator to perform either of the following actions:

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 235

l Approve (whitelist) the Microsoft application agent on the target virtual machine.

l Provide the Data Domain or PowerProtect X400 storage unit login credentials.

The SQL Server host field is updated with the client backups that are available on the selected Data Domain or PowerProtect X400 server storage unit.

4. From the SQL Server host list, select the SQL Server host that is the source of the backup.

If you are restoring an AAG database, you must select the Windows cluster name, which enables you to browse the list of AAGs hosted on this cluster.

5. Use the Start browsing from list to select a backup save time, and then click Show Versions.

The SQL Server Instance field and save sets table are updated with the backups that are within the specified browse time. If no level full backups are found in the specified time range, you are prompted for confirmation to load the latest full backup.

Note: If you selected a cluster name in the preceding step, then the list of AAGs in the cluster is displayed instead of the list of SQL Server instances.

6. From the SQL Server Instance list, select the SQL Server instance that contains the databases that you want to restore.

The databases located on the SQL Server instance appear in the database table below the SQL Server Instance field.

7. From the database table, select either the entire SQL Server instance by selecting the check box in the header row or select only the required databases to restore.

The corresponding save sets appear in the save sets table that is below the databases table.

8. For single database restores, from the save sets table, select the database backup and timestamp that you want to restore.

By default, the most recent backup is selected. Note: This step only applies to single database restores. For multiple database and instance-level restores, the most recent backup is restored.

9. (Optional) To restore the database to a specific point in time, perform the following steps:

a. Under Destination, click Timeline.

The Backup Timeline dialog box appears as shown in the following figure. Figure 51 Specifying the restore point

b. Specify the backup date and time, and then click OK.

Restoring Virtual Machine Backups with vProxy Engine

236 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

10. Specify the restore destination by performing one of the following action sequences:

l To perform a recovery directly to a database, perform the following steps:

a. Select Restore to SQL Server.

b. From the Instance list, select the SQL Server instance where you want to restore the backup.

Note: If you are restoring the backup to an alternate instance, the data and log files are automatically relocated to the target SQL instance default data and log path. You can change the file destination settings on the Files page.

If you are restoring an AAG database, select the target instance that is part of the AAG for the restore. You must remove the database from the AAG first. You can add the database back to the AAG after the restore completes.

c. From the Database list, select or type the name of the database where the backup will be restored to. If the database exists, the operation prompts you for confirmation to overwrite the database.

l To recover the database as flat-files, perform the following steps:

a. Select Restore backups as files.

b. In the Folder field, specify the destination for the files. The Folder field is populated with the default destination path.

To perform a redirected restore, change the destination path by clicking ... beside the Folder field, and specifying the required destination.

Note: Ensure that the destination path is not a root drive, for example, E:\.

Full backups are restored as .mdf, .ndf, and .ldf files. Transaction log backups are restored as .bak files.

After you finish

Specify the PowerProtect server details and additional restore options on the Options page. Also, to change the file destination settings, use the Files page.

Configure file destination settings View and change the default destination folders of the database files that are data files (.mdf and .ndf) and log files (.ldf) from the Database Restore > Files page.

About this task

All settings on the Files page are optional.

File information on the Files page is shown only when a single database and a backup version is selected on the General page. If you select multiple databases or do not select a backup version, file information does not appear and the databases are restored to the latest backup.

Note: If you are restoring the backup to an alternate instance, the data and log files are automatically relocated to the target SQL instance default data and log path. You can change the file destination settings on the Files page.

Ensure that the SQL Server administrative account for the target SQL Server instance has access to the selected path so that it can access the database files once they are mounted.

Procedure

1. From the left panel, click Files.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 237

The Files page appears as shown in the following figure.

Figure 52 vProxy Engine: Database Restore Files page

The table on the page displays the source locations of the database files.

2. To change the destination paths of all of the data and log files, perform the following steps:

a. Select Relocate all files to folder.

b. Click the Data file folder browse button to specify a location for the data files, or click inside the field to type the folder path.

c. Click the Log file folder browse button to specify a location for the log files, or click inside the field to type the folder path.

3. To change the destination path at the file group level, perform one of the following actions in the table:

l To browse for a destination path, click the browse button to the right of each file group. A window appears where you can browse and select the file path.

l To type a new destination path, in the Restore To column, click the appropriate cell and type a destination path. If the path does not exist, a dialog box appears asking if you want to create the folder.

Note: Ensure that the destination paths are not root drives, for example, E:\.

After you finish

Specify the PowerProtect server details and additional restore options on the Options page.

Restoring Virtual Machine Backups with vProxy Engine

238 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Configure database restore options When you configure SQL database restores with the Microsoft app agent for vProxy Engine SSMS plug-in, you can specify additional restore options on the Database Restore > Options page.

About this task

Note: If you want to restore an AAG database, you must remove the database from the AAG first. You can add the database back to the AAG after the restore completes. If you have not removed the database from the AAG before you start the restore, the restore UI displays a prompt about the requirement.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure. Figure 53 vProxy Engine: Database Restore Options page

2. In the Recovery state list, select one of the following options, as required:

Option Description

RESTORE WITH RECOVERY

(Default) To leave the database in the ready-to-use state by rolling back uncommitted transactions, and disable the ability to restore the latest or additional transaction logs.

RESTORE WITH NORECOVERY

To leave the database in the non-operational state by not rolling back uncommitted transactions, and enable the ability to restore the latest or additional transaction logs.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 239

Option Description

3. To compress the restore contents and transport them from the Data Domain Replicator to the application host, select Data Domain Boost compressed restore.

This option reduces network bandwidth.

4. To generate detailed logs, which you can use to troubleshoot the restore issues, select Select a debug level, and then specify a value of 1 through 9. The default value is 0 (zero).

5. To delete debug logs older than a certain number of days, select Delete debug logs after, and then specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

6. To enable advanced restore options, type or select one of the following options in the Advanced options list:

Option Description

KEEP_REPLICATION Preserves the replication when recovering a published database. This option is required if a database was replicated when the backup was created.

KEEP_CDC Enables change data capture (CDC) recovery. When restoring a database with CDC enabled, the recover operation works differently depending on the recovery destination. Use the to KEEP_CDC option to:

l Recover the CDC enabled database with a different name on the same SQL instance. In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on a different SQL server instance. In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on the same SQL instance by overwriting an existing database. In this scenario, KEEP_CDC is optional.

Separate multiple advanced options with a comma.

7. To limit the backup history of the databases on the General page to a set number of days, type or select a number in the Days of backup history field.

The default value is 7 days.

If no level full backups are found in the specified time range, you are prompted for confirmation to load the latest full backup.

8. To use the client name that is provided as is without converting it to the fully qualified domain name (FQDN), select Exclude client name resolution.

Use this option when you restore to a virtual machine in a different domain that does not have name resolution for the source client, or when the source host is no longer available.

Restoring Virtual Machine Backups with vProxy Engine

240 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

9. To perform a transaction log backup of the data before performing restore, select Take tail- log backup before restore.

The tail-log backup ensures that the Microsoft application agent backs up the transaction logs that has changed from the previous backup. The restore operation does not restore the logs of the previous tail-log backup.

Note: The tail-log backup feature through the SSMS plug-in is not supported for AAG. Only scheduled transaction log backups through a PowerProtect protection policy may be performed.

Tail-log backup is not supported in the following scenarios:

l When you select Restore backups as files on the General page.

l When the PowerProtect protection policy has Data Domain or PowerProtect X400 MTree replication enabled and you select the secondary Data Domain or PowerProtect X400 system as the backup source.

The Microsoft application agent does not support tail-log backups of multiple databases.

10. To specify the PowerProtect appliance, perform the following steps:

a. Beside Appliance Host, click ...

The PowerProtect Data Manager List & Lockbox Settings window appears.

When you restore a backup to the original virtual machine, the details for the PowerProtect appliance that protects the SQL Server in a protection policy automatically appear.

b. If you do not see the PowerProtect appliance that you want to use for the restore operation, click Add, and then in the Add PowerProtect Data Manager details dialog box, perform one of the following actions:

l To add a PowerProtect with credential-based authentication, specify the appliance hostname and the login credentials.

Contact the PowerProtect administrator to retrieve the PowerProtect appliance host and login details.

l To add a PowerProtect with certificate-based authentication, specify only the appliance hostname. Do not specify the username and password fields.

To use certificate-based authentication, the PowerProtect administrator must whitelist the target Microsoft application agent.

When you add a virtual machine to a protection policy, that virtual machine is whitelisted with a certificate that expires after one day. If you are restoring to an alternate virtual machine that is an asset of PowerProtect but not a member of a protection policy, the PowerProtect must whitelist the target virtual machine.

The PowerProtect administrator can approve (whitelist) the target Microsoft application agent on the PowerProtect Infrastructure > Application Agents page.

c. Select the PowerProtect appliance that will mount the backup, and then click OK.

11. To start the restore operation, click Run.

Monitor the database restore operation After a database restore operation is run from the Microsoft app agent for vProxy Engine SSMS plug-in, the Database Restore > Monitor page displays the restore script and status.

The following figure shows the restore information and status as it appears on the Monitor page.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 241

Figure 54 vProxy Engine: Database Restore Monitor page

Note: For information about the success or failure of the restore operation, review the log files that are located in the installation folder. The location of the log files when the Microsoft application agent is installed in the default path is C:\Program Files\DPSAPPS \MSAPPAGENT\logs.

Restore a SQL Server database with the vProxy Engine recover command Learn how to perform a vProxy Engine SQL Server database restore operation using the command line.

Syntax to restore a database with a level full backup

Run the following command to restore databases with vProxy Engine:

msagentrc.exe -A VM_DIRECT=TRUE -A "NSR_RESTORE_TYPE=regular" -c -A "NSR_DFA_SI_DD_HOST= " -A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A "DM_HOST= " [ ] -I - -t

where:

-A VM_DIRECT=TRUE

Specifies to use the vProxy Engine workflow for the recover operation.

Restoring Virtual Machine Backups with vProxy Engine

242 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

-A "NSR_RESTORE_TYPE=regular"

Specifies to perform a database level restore.

-c

Specifies the client name that was used for the backup.

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain or PowerProtect X400 server that contains the backup. When you have a remote (secondary) Data Domain or PowerProtect X400 server that has replicated databases to restore, type the name of the secondary server. A Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary server.

-A "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-A "DM_HOST= "

Specifies the PowerProtect appliance hostname or IP address.

-t

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Specifies the path to the backup objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 40 Example vProxy Engine level full database restore commands

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 243

Example 40 Example vProxy Engine level full database restore commands

msagentrc.exe -A VM_DIRECT=TRUE -A DM_MOUNT_TIMEOUT=240 -A DM_HOST=12.34.155.77 -A DM_PORT=8443 -c appvm-sql.appvmtest.com -A NSR_DFA_SI_DD_HOST=mars.jupiter.emc.com -A NSR_DFA_SI_DD_USER=admin_user -A NSR_DFA_SI_DEVICE_PATH=/PLC- PROTECTION-11234 -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files \DPSAPPS\common\lockbox" -A RESTORE_FROM_DD_ONLY=YES -A NSR_RESTORE_TYPE=regular -I - -t 1541991384 APPLICATIONS:\SqlServerWriter\APPVM-SQL\DB1\

msagentrc.exe -A VM_DIRECT=TRUE -A DM_MOUNT_TIMEOUT=240 -A DM_HOST=12.34.222.184 -A DM_PORT=8443 -c win-appvm-000.appsvm.com - A NSR_DFA_SI_DD_HOST=host.lss.emc.com -A NSR_DFA_SI_DD_USER=PLC- PROTECTION-USER -A NSR_DFA_SI_DEVICE_PATH=/PLC-PROTECTION-154 -A "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common \lockbox" -A RESTORE_FROM_DD_ONLY=YES -A NSR_RESTORE_TYPE=regular - I - -t 1543513971 APPLICATIONS:\SqlServerWriter\WIN- APPVM-191\ReportServerTempDB\ -t 1543513971 APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\master \ -t 1543513971 APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\model\ -t 1543513971 APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\msdb\ -t 1543513971 -A ADDITIONAL_RESTORES=yes APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\ReportServer\ -t 1543513971 -A ADDITIONAL_RESTORES=yes APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\data1\ -t 1543513971 -A ADDITIONAL_RESTORES=yes APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\data10\ -t 1543513971 -A ADDITIONAL_RESTORES=yes APPLICATIONS:\SqlServerWriter\WIN-APPVM-191\data11\

Syntax to restore a database with a transaction log backup Use the ddbmsqlrc command to restore a transaction log from the command prompt for vProxy Engine workflow backups. This command may be used if the database full backup was restored in the NORECOVERY state.

Run the following command to restore database transaction logs in a stand-alone environment with vProxy Engine:

ddbmsqlrc.exe -a VM_DIRECT=TRUE -a "NSR_DFA_SI_DD_HOST= " -a "NSR_DFA_SI_DD_USER= " -a "NSR_DFA_SI_DEVICE_PATH= " -c [-a "SKIP_CLIENT_RESOLUTION=TRUE"] -t -S normal -a "RESTORE_START_TIME= "

where:

-A VM_DIRECT=TRUE

Specifies to use the vProxy Engine workflow for the recover operation.

-a "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain or PowerProtect X400 server that contains the backup.

Restoring Virtual Machine Backups with vProxy Engine

244 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

When you have a remote (secondary) Data Domain or PowerProtect X400 server that has replicated databases to restore, type the name of the secondary server. A Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary server.

-a "NSR_DFA_SI_DD_USER= "

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-a "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-c

Specifies the client name that was used for the backup.

-a "SKIP_CLIENT_RESOLUTION=TRUE"

(Optional) Specifies to use the client name as it is exactly entered with the -c option and to skip the FQDN lookup to automatically resolve the client name.

-t " "

Specifies the backup time stamp that you want to restore.

-S normal

Enables you to roll back uncommitted transactions and use the database to restore the most recent or additional transaction logs.

-a "RESTORE_START_TIME= "

Restores all the backups that were performed at or after a specified backup time (start date and time) and up to the backup time of the selected save set, that is, -t . Specify the start date and time in the /

/
: : {AM | PM} format.

The start date and time must not be after the backup time of the selected save set, that is, -t .

" "

Specifies the path to the backup objects that you want to restore. Type the restore path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore backups of the entire instance, type MSSQL: n To restore backups of specific databases, type [MSSQL:]

[[MSSQL:] [...]] For example: "MSSQL:database1" "MSSQL:database2"

l For a named instance, type the path in one of the following formats:

n To restore backups of the entire instance, type MSSQL$ : n To restore backups of specific databases, type MSSQL

$ : [...] For example: "MSSQL$SqlInst1:database1" "MSSQL$SqlInst1:database2"

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 245

Example 41 Example vProxy Engine transaction logs database restore commands

ddbmsqlrc.exe -a NSR_DFA_SI_DD_HOST=mars.jupiter.emc.com -a NSR_DFA_SI_DD_USER=PLC-PROTECTION-USER -a NSR_DFA_SI_DEVICE_PATH=/ PLC-PROTECTION-123456 -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -c appvm-sql.appvmdc.com -a "SKIP_CLIENT_RESOLUTION=TRUE" -C "'DB1'='C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\DB1.mdf', 'DB1_log'='C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER \MSSQL\DATA\DB1_log.ldf'" -t "11/12/2018 08:54:53 AM" -S normal -a "RESTORE_START_TIME=11/12/2018 08:26:25 AM" -a VM_DIRECT=TRUE MSSQL:DB1

ddbmsqlrc.exe -a NSR_DFA_SI_DD_HOST=host.lss.emc.com -a NSR_DFA_SI_DD_USER=PLC-PROTECTION-USER -a NSR_DFA_SI_DEVICE_PATH=/ PLC-PROTECTION-154 -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files \DPSAPPS\common\lockbox" -c win-appvm-191.appsvm.com -a "SKIP_CLIENT_RESOLUTION=TRUE" -C "'ReportServer'='C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA \ReportServer.mdf', 'ReportServer_log'='C:\Program Files (x86)\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA \ReportServer_log.ldf'" -S normal -a "RESTORE_START_TIME=11/29/2018 09:52:52 AM" -a VM_DIRECT=TRUE MSSQL:ReportServer

Optional parameters for vProxy Engine database-level restores

You can use the following optional parameters with the msagentrc.exe command.

-A "NSR_DFA_SI_DD_LOCKBOX_PATH= "

Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

-A "DM_USER= "

Specifies the username to use for the PowerProtect connection. This parameter is mandatory only for credential-based access to the PowerProtect appliance. You are not required to specify this parameter when the Microsoft application agent is whitelisted by PowerProtect.

When you add a virtual machine to a protection policy, that virtual machine is whitelisted with a certificate that expires after one day. The PowerProtect administrator can approve (whitelist) the target Microsoft application agent on the PowerProtect Infrastructure > Agents page.

-A "DM_PORT= "

Specifies the port number to communicate with the PowerProtect server. The default value is 8443.

-A "DM_LOG_LEVEL={WARNINGS | INFO | TRACE | DEBUG}"

Specifies the PowerProtect log level, with WARNINGS providing the least amount of detail, and DEBUG providing the most amount of detail.

-A "DM_LOG_TAG= "

Restoring Virtual Machine Backups with vProxy Engine

246 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the PowerProtect log tag.

-A "ADDITIONAL_RESTORES={yes | no}"

Specifying yes disables the ability to roll back uncommitted transactions and uses the database to restore the latest or additional transaction logs. The default value is no.

-A "RENAME_TO= "

Specifies the new name for the destination database. The selected database will be restored to the new database. The new name of the database must be a valid SQL database name. If the destination contains a database with the same name as the database that you have specified, the restore operation overwrites the existing database. The database files that are data files (.mdf and .ndf) and log file (.ldf) will be restored to their source locations only. If the source database exists, its files can be in use. So, to avoid conflicts for using a new database name, use the -A RELOCATE_TO option along with the -A RENAME_TO option.

-A "INSTANCE_TO= \ "

Performs a redirected restore operation to a SQL Server instance that is different from the source instance where the backup was taken.

Note: The target instance must reside on the same system where the restore operation is configured. You cannot restore the backup to an instance on a remote host.

-A "RELOCATE_TO=' '='destination_folder-1', ' '='destination_folder-2',[...]"

Performs redirected restores of the database files that are data files (.mdf and .ndf) and log file (.ldf). You can rename or change only the destination folders, but not the filenames. Ensure that the destination paths are not root drives, for example, E:\.

-A "NSR_SQL_RECOVER_MODE= "

Performs a redirected restore to the specified path.

-A "NSR_SQL_TARGET_DIR= "

Specifies the destination path, to which you want to copy the restored files. You can then manually either move the files to the required folder or attach the files to a SQL Server instance. Ensure that the destination path is not a root drive, for example, E:\.

-D

Generates detailed logs that you can use to troubleshoot the restore issues. The supported debug levels are 1 through 9.

-A "DELETE_DEBUG_LOG_DAYS= "

Deletes debug log files that are older than the specified number of days. The valid range is between 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

Note: This parameter only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 247

Performing SQL Server table-level recovery to a virtual machine

To recover table-level data, you can use the SSMS plug-in to first mount the backup, and then use ItemPoint for Microsoft SQL Server to browse and restore the tables.

Note: You can only mount and restore tables from the level full backups.

Table-level restore operations mount the application-aware virtual machine image backup on the target virtual machine.

The Microsoft application agent sends a request to the PowerProtect appliance to mount the selected backup.

When the backup is mounted, the VMDK images from the virtual machine image backup are added to the target-virtual machine and assigned mount points.

The backup is mounted with the PowerProtect appliance for 4 hours by default. The valid range for the mount timeout is between 1 and 24 hours, after which the mounted backup must be dismounted.

Note: When backup images are mounted, you cannot start a new session of backup, database restore, table-level restore, or instant access.

Restore SQL Server tables with the vProxy Engine SSMS plug-in Learn how to perform a vProxy Engine SQL Server table-level restore operation using the Microsoft app agent for vProxy Engine SSMS plug-in.

Launch the Microsoft app agent for vProxy Engine SSMS plug-in Procedure

1. From the Windows Start menu, select Microsoft SQL Server Management Studio.

2. In the Microsoft SQL Server Management Studio, in the Connect to Server window, specify the server information and credentials, and then click Connect.

3. In the toolbar, click Microsoft App Agent (vProxy Engine).

The Microsoft app agent for vProxy Engine window appears. Note: If the Microsoft App Agent (vProxy Engine) button is not on the toolbar, the plug-in may be unable to register. In this scenario, you can launch the plug-in directly from the start menu. From the Windows Start menu, select DDBMA Plugin for SQL Server Management Studio.

Configure general table restore settings To configure SQL table-level restores with the Microsoft app agent for vProxy Engine SSMS plug- in, you must first specify general table restore options on the Table Restore > General page.

Procedure

1. Open the Microsoft app agent for vProxy Engine window to the Table Restore > General page.

The General page appears as shown in the following figure.

Restoring Virtual Machine Backups with vProxy Engine

248 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 55 vProxy Engine: Table Restore General page

2. Beside Data Domain Server, click .

The Data Domain Server List & Lockbox Settings window appears and lists the Data Domain or PowerProtect X400 server and lockbox that is configured in the PowerProtect protection policy. If the protection policy is configured for replication, the secondary Data Domain or PowerProtect X400 server and storage unit also appear.

3. In the Data Domain Server List & Lockbox Settings window, select the Data Domain or PowerProtect X400 server that contains the backup, and then click OK.

The SQL Server host field is updated with the client backups that are available on the selected Data Domain or PowerProtect X400 server.

4. From the SQL Server host list, select the SQL Server host that is the source of the backup.

If you are restoring an AAG database, you must select the Windows cluster name, which enables you to browse the list of AAGs hosted on this cluster.

5. Use the Start browsing from list to select a backup save time, and then click Show Versions.

The SQL Server Instance field and save sets table are updated with the backups that are within the specified browse time. If no level full backups are found in the specified time range, you are prompted for confirmation to load the latest full backup.

Note: If you selected a cluster name in the preceding step, then the list of AAGs in the cluster is displayed instead of the list of SQL Server instances.

6. From the SQL Server Instance list, select the SQL Server instance that contains the databases that you want to restore.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 249

The databases located on the SQL Server instance appear in the database table below the SQL Server Instance field.

7. From the databases table, select the database that contains the tables that you want to restore.

The corresponding save sets appear in the save sets table.

8. In the save sets table, select the save set that contains the tables that you want to restore.

After you finish

Specify the PowerProtect server details and additional restore options on the Options page.

Configure table restore options When you configure SQL table-level restores with the Microsoft app agent for vProxy Engine SSMS plug-in, you can specify additional restore options on the Table Restore > Options page.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure.

Figure 56 vProxy Engine: Table Restore Options page

2. Under Mount, specify the following fields as required:

l The Mount Folder field specifies the location where backup images are mounted. You cannot edit the value in this field.

Restoring Virtual Machine Backups with vProxy Engine

250 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

l In the Mount Timeout list, specify the number of hours, after which the mounted backup image must be dismounted. The default value is 4, and the value cannot be more than 24 hours.

l To prevent ItemPoint from launching after you run the mount operation, select Do not run ItemPoint after mounting the backup images. Selecting this option disables the Leave backup images mounted after ItemPoint exits option, and enables you to perform manual table-level restores.

l To leave the backup images in the mounted state after you close ItemPoint, select Leave backup images mounted after ItemPoint exits. This option is enabled only if you have not selected the Do not run ItemPoint after mounting the backup images option.

3. To generate detailed logs, which you can use to troubleshoot the restore issues, select Select a debug level, and then specify a value of 1 through 9. The default value is 0 (zero).

4. To delete debug logs older than a certain number of days, select Delete debug logs after, and then specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

5. To limit the backup history of the databases on the General page to a set number of days, type or select a number in the Days of backup history field.

The default value is 7 days. If no level full backups are found in the specified time range, you are prompted for confirmation to load the latest full backup.

6. To use the client name that is provided as is without converting it to the fully qualified domain name (FQDN), select Exclude client name resolution.

Use this option when you restore to a virtual machine in a different domain that does not have name resolution for the source client.

7. To specify the PowerProtect appliance, perform the following steps:

a. Beside Appliance Host, click ...

The PowerProtect Data Manager List & Lockbox Settings window appears. When you restore a backup to the original virtual machine, the details for the PowerProtect appliance that protects the SQL Server in a protection policy automatically appear.

b. If you do not see the PowerProtect appliance that you want to use for the restore operation, click Add, and then in the Add PowerProtect Data Manager details dialog box, perform one of the following actions:

l To add a PowerProtect with credential-based authentication, specify the appliance hostname and the login credentials. Contact the PowerProtect administrator to retrieve the PowerProtect appliance host and login details.

l To add a PowerProtect with certificate-based authentication, specify only the appliance hostname. Do not specify the username and password fields. To use certificate-based authentication, the PowerProtect administrator must whitelist the target Microsoft application agent.

When you add a virtual machine to a protection policy, that virtual machine is whitelisted with a certificate that expires after one day. If you are restoring to an

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 251

alternate virtual machine that is an asset of PowerProtect but not a member of a protection policy, the PowerProtect must whitelist the target virtual machine.

The PowerProtect administrator can approve (whitelist) the target Microsoft application agent on the PowerProtect Infrastructure > Application Agents page.

c. Select the PowerProtect appliance that will mount the backup, and then click OK.

8. To mount the backup and proceed with the table restore, click Run.

Monitor the table restore mount operation After a table-level restore mount operation is run from the Microsoft app agent vProxy Engine SSMS plug-in, the Table Restore > Monitor page displays the mount script and status.

The following figure shows the mount information and status as it appears on the Monitor page.

Figure 57 vProxy Engine: Table Restore Monitor page

Note: For information about the success or failure of the restore operation, review the log files that are located in the installation folder. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restore table-level data using ItemPoint After the backup images are mounted using the Microsoft application agent SSMS plug-in, complete the table-level restore using ItemPoint for Microsoft SQL Server.

Before you begin Configure and run the table level restore operation with the Table Restore tab in the Microsoft application agent SSMS plug-in.

Restoring Virtual Machine Backups with vProxy Engine

252 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

About this task

Once the table level restore is configured and run through the Microsoft application agent SSMS plug-in, ItemPoint launches.

If you select Do not run ItemPoint after mounting the backup images when you configure the table level restore, you must manually launch ItemPoint, and then launch the Data Wizard.

Procedure

1. On the Select Source page, select the source backup files from the mounted volume that contains the SQL backup data as shown in the following figure, and then click Next.

Figure 58 ItemPoint Data Wizard: select the source files

2. On the Select Target Server page, specify the details and login credentials for the target SQL Server and database.

The following figure shows the ItemPoint Data Wizard Select Target Server page:

Figure 59 ItemPoint Data Wizard: select the target server

3. Click Finish.

The Data Wizard closes and ItemPoint loads the tables contained in the source backup files.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 253

4. Use ItemPoint to browse and restore the individual tables. Note: The PowerProtect ItemPoint for Microsoft SQL Server User Guide provides more information on using ItemPoint for Microsoft SQL Server to restore table-level data.

5. To dismount the mounted backup images, exit ItemPoint for Microsoft SQL Server. Note: If you select Leave backup images mounted after ItemPoint exits or Do not run ItemPoint after mounting the backup images when you configure the mount operation, the backup image remains mounted for 4 hours. To dismount the backup manually, use the msagentadmin command.

Restore SQL Server tables with the vProxy Engine recover command Learn how to perform a vProxy Engine SQL Server table-level restore operation using a command prompt.

Mount vProxy Engine backups for table-level recovery using the command prompt Use the msagentrc.exe command with the -A NSR_RESTORE_TYPE=mount parameter to mount backups for table-level recovery.

Type the recover command with the following syntax to mount vProxy Engine backup images:

msagentrc.exe -A VM_DIRECT=TRUE -c [-A "SKIP_CLIENT_RESOLUTION=TRUE"] -A NSR_RESTORE_TYPE=mount -A "NSR_DFA_SI_DD_HOST= " -A "NSR_DFA_SI_DD_USER= " -A "NSR_DFA_SI_DEVICE_PATH= " -A "DM_HOST= " [-A "DM_USER= "] [-A "DM_PORT= "] [-A "DM_MOUNT_TIMEOUT= "] [-A "NSR_DFA_SI_DD_LOCKBOX_PATH= "] -I - -t

where:

-A VM_DIRECT=TRUE

Specifies to use the vProxy Engine workflow for the recover operation.

-c

Specifies the client name that was used for the backup.

-A "SKIP_CLIENT_RESOLUTION=TRUE"

(Optional) Specifies to use the client name as it is exactly entered with the -c option and to skip the FQDN lookup to automatically resolve the client name.

-A NSR_RESTORE_TYPE=mount

Specifies a mount operation

-A "NSR_DFA_SI_DD_HOST= "

Specifies the name of the Data Domain or PowerProtect X400 server that contains the backup. When you have a remote (secondary) Data Domain or PowerProtect X400 server that has replicated databases to restore, type the name of the secondary server. A Data Domain or PowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server must be in the same group as the primary server.

-A "NSR_DFA_SI_DD_USER= "

Restoring Virtual Machine Backups with vProxy Engine

254 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Specifies the username of the DD Boost user. You must register the hostname and the DD Boost username in the lockbox to enable Microsoft application agent to retrieve the password for the registered user.

-A "NSR_DFA_SI_DEVICE_PATH= "

Specifies the name and the path of the storage unit that contains the backup.

-A "DM_HOST= "

Specifies the PowerProtect appliance hostname or IP address.

-A "DM_USER= "

(Optional) Specifies the username to use for the PowerProtect connection. This parameter is mandatory only for credential-based access to the PowerProtect appliance. You are not required to specify this parameter when the Microsoft application agent is whitelisted by PowerProtect.

When you add a virtual machine to a Lifecycle group, that virtual machine is whitelisted with a certificate that expires after one day. The PowerProtect administrator can approve (whitelist) the target Microsoft application agent on the PowerProtect Infrastructure > Agents page.

-A "DM_PORT= "

(Optional) Specifies the port number to communicate with the PowerProtect server. The default value is 8443.

-A "DM_MOUNT_TIMEOUT= "

(Optional) Specifies the amount of time in minutes until the mount times out. The default value is 4 hours (240 minutes).

-A "NSR_DFA_SI_DD_LOCKBOX_PATH= "

(Optional) Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common \lockbox.

-t

Specifies the save time of the backup. Specify this parameter along with the restore path for each database in the restore operation. The application pauses for you to input this option line by line. Press Enter to move to the next line. A blank line indicates completion of the list.

Specifies the path to the objects that you want to restore. Type the backup path in one of the following formats:

l For a default instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3" l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, type APPLICATIONS:\SqlServerWriter\

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 255

n To restore a backup of specific databases, type APPLICATIONS:\SqlServerWriter\ \ \ [...]\ The is typically %5C

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Restore table-level data using ItemPoint Procedure

1. Launch the command prompt.

2. Run the following command:

C:\Program Files (x86)\DPSAPPS\MSAPPAGENT\ItemPoint\Sql\EMCIPSQL.exe

The ItemPoint for Microsoft SQL Server appears.

3. Launch the Data Wizard.

The Data Wizard appears to the Select Source page.

4. On the Select Source page, select the source backup files from the mounted volume that contains the SQL backup data as shown in the following figure, and then click Next.

Figure 60 ItemPoint Data Wizard: select the source files

5. On the Select Target Server page, specify the details and login credentials for the target SQL Server and database.

The following figure shows the ItemPoint Data Wizard Select Target Server page:

Restoring Virtual Machine Backups with vProxy Engine

256 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Figure 61 ItemPoint Data Wizard: select the target server

6. Click Finish.

The Data Wizard closes and ItemPoint loads the tables contained in the source backup files.

7. Use ItemPoint to browse and restore the individual tables.

Note: The PowerProtect ItemPoint for Microsoft SQL Server User Guide provides more information on using ItemPoint for Microsoft SQL Server to restore table-level data.

After you finish

Dismount the backups using the msagentadmin.exe command.

Dismount the backup images You must dismount the backup images after the table-level restore operation is complete.

To dismount the backup images, run the following command:

msagentadmin dismount --ddhost " " --ddpath " " --dduser " " --dmhost " " -dmport [--lockbox ]

where:

dismount

Specifies an operation to dismount backups.

--ddhost " "

Specifies the name of the Data Domain or PowerProtect X400 server that contains the storage unit, to which you backed up the databases.

--ddpath " "

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser " "

Specifies the username of the DD Boost user.

---dmhost " "

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 257

Specifies the PowerProtect appliance hostname or IP address.

--dmport

Specifies the port number to communicate with the PowerProtect server. The default value is 8443.

--lockbox

(Optional) Specifies the folder that contains the lockbox file, which contains encrypted information about the registered hosts and the corresponding usernames in pairs. Each pair is associated with a password that backups use. If you do not specify a value, the path defaults to the installation path, which is typically C:\Program Files\DPSAPPS\common \lockbox.

Example 42 Example vProxy Engine dismount command

msagentadmin.exe dismount --ddhost mars.jupiter.emc.com --ddpath / PLC-PROTECTION-123456 --dduser PLC-PROTECTION-USER --dmhost 11.22.333.44 --dmport 8443 --lockbox "C:\Program Files\DPSAPPS \common\lockbox"

Performing an instant access recovery An instant access recovery enables you to quickly bring a database online from a point-in-time by running the database directly on protection storage, which is added to the host through a backup image mount.

Instant access recovery overview Instant access recovery enables you to access a live-mounted SQL database from protection storage without restoring the virtual machine or SQL database.

This type of operation is useful for database administrators who must use or query a SQL database before restoring the database due to time and resource constraints.

This feature also supports the migration of mounted disks containing live mounted databases from protection storage to production datastore.

When you initiate instant access recovery, the operation locates the corresponding backup virtual disks and mounts them from the Data Domain or PowerProtect X400 protection storage. The operation locates the SQL Server database selected by the database administrator from mounted disks and connects the database to the SQL Server instance. If transaction logs were selected, the transaction logs are replayed against the instant access database.

Instant access recovery use cases Instant access recovery to a SQL Server database is useful in a number of cases, including ad hoc queries, health checks, disaster recovery, and development tests.

Ad hoc queries

When you need a history of changes, perform an instant access restore to mount SQL databases for browsing and finding historical data.

Restoring Virtual Machine Backups with vProxy Engine

258 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

With SQL instant access recovery, you can browse the history of changes in specific rows or tables quickly by running SQL queries on the mounted database. You can also execute SQL queries to move data from a mounted database to a live SQL database.

Health checks

You can validate the SQL database health by running health check queries on the live mounted database.

By performing health checks on the mounted database instead of the live database in the production environment, you can reduce the impact on production resources while checking the health status.

Disaster recovery

During a disaster recovery, SQL instant access recovery provides temporary access to SQL data while the database is down.

You can connect the live mounted database to a SQL Server instance for urgent queries.

Development tests

Merging changes to the production database is an operation with a risk of breaking applications.

With SQL instant access recovery, you can use a replica of the database to test changes before you upload them to the live production database.

Perform an instant access restore with the vProxy Engine SSMS plug-in Learn how to perform a vProxy Engine SQL Server instant access restore operation using the Microsoft app agent for vProxy Engine SSMS plug-in.

Launching the Microsoft app agent for vProxy Engine SSMS plug-in

To launch the Microsoft app agent for vProxy Engine SSMS plug-in, perform the following steps:

1. From the Windows Start menu, select Microsoft SQL Server Management Studio.

2. In the Microsoft SQL Server Management Studio, in the Connect to Server window, specify the server information and credentials, and then click Connect.

3. In the toolbar, click Microsoft app agent for vProxy Engine.

Note: If you have not installed SSMS, to start the Microsoft app agent for vProxy Engine SSMS plug-in, in the \DPSAPPS\MSAPPAGENT\bin folder, double-click the DDSSMSAddinApp.exe file.

Configure general instant access settings To configure SQL restores with the Microsoft app agent for vProxy Engine SSMS plug-in, you must first specify general restore options on the Instant Access > General page.

Procedure

1. Open the Microsoft app agent for vProxy Engine window to the Instant Access > General page.

The General page appears as shown in the following figure.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 259

Figure 62 vProxy Engine: Instant Access General page

2. Beside Data Domain Server, click ...

The Data Domain Server List & Lockbox Settings window appears and lists the Data Domain or PowerProtect X400 server and lockbox that is configured in the PowerProtect protection policy. If the protection policy is configured for replication, the secondary Data Domain or PowerProtect X400 server and storage unit also appear.

3. In the Data Domain Server List & Lockbox Settings window, select the Data Domain or PowerProtect X400 server that contains the backup, and then click OK.

The SQL Server host field is updated with the client backups that are available on the selected Data Domain or PowerProtect X400 server.

4. From the SQL Server host list, select the SQL Server host that is the source of the backup.

If you are restoring an AAG database, you must select the Windows cluster name, which enables you to browse the list of AAGs hosted on this cluster.

5. Use the Start browsing from list to select a backup save time, and then click Show Versions.

The SQL Server Instance field and save sets table are updated with the backups that are within the specified browse time. If no level full backups are found in the specified time range, you are prompted for confirmation to load the latest full backup.

Note: If you selected a cluster name in the preceding step, then the list of AAGs in the cluster is displayed instead of the list of SQL Server instances.

6. From the SQL Server Instance list, select the SQL Server instance that contains the databases that you want to mount for instant access.

Restoring Virtual Machine Backups with vProxy Engine

260 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

The databases located on the SQL Server instance appear in the database table below the SQL Server Instance field.

7. From the database table, select either the entire SQL Server instance by selecting the check box in the header row or select only the required databases to mount for instant access.

The corresponding save sets appear in the save sets table that is below the databases table.

Note: The Microsoft application agent does not support instant access for system databases. The system databases do not appear in the database table.

8. For single database instant access, from the save sets table, select the database backup and timestamp that you want to mount for instant access.

By default, the most recent backup is selected. Note: This step only applies to single database instant access. For multiple database and instance-level operations, the most recent backup is mounted and the most recent transaction logs for the browse time are restored.

9. (Optional) To access the database from a specific point in time, perform the following steps:

a. Under Access by time, click Timeline.

The Backup Timeline dialog box appears as shown in the following figure. Figure 63 Specifying the access point

b. Specify the backup date and time, and then click OK.

10. Under Destination, specify the details for the mount operation:

a. From the Instance list, select the target SQL Server instance to mount the backup.

b. From the Database list, select the name of the SQL Server database for instant access.

When you select a single database, you can specify a new name for the database. For instant access, a default name is generated, by appending the text "InstantAccess" and a date/time stamp to the original database name. For a single database restore, you may change this name. For a multiple database restore, you may not change the database name and the default database name is used.

Configure optional instant access settings When you configure SQL database instant access restores with the Microsoft app agent for vProxy Engine SSMS plug-in, you can specify optional settings on the Instant Access > Options page.

About this task

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 261

Procedure

1. From the left panel, click Options to specify optional instant access settings.

The Options page appears as shown in the following figure.

Figure 64 vProxy Engine: Instant Access Options page

2. Under Mount:

l The Mount Folder field specifies the location where backup images are mounted.

Note: The value in the Mount Folder field is the default mount location, \config \mount.

Ensure that the SQL Server administrative account for the target SQL Server instance has access to this path so that it can access the database files once they are mounted.

l In Mount Timeout, specify the number of hours, after which the mounted backup image must be dismounted. The default value is 24 hours.

Note: After the mount starts, you can extend the mount timeout by clicking Extend, which extends the mount timeout by the initial timeout value that was set during the mount. To preserve any changes that you make to the database during the instant access active time, you can vMotion the database.

3. To generate detailed logs, which you can use to troubleshoot the mount issues, select Select a debug level, and then specify a value of 1 through 9. The default value is 0 (zero).

Restoring Virtual Machine Backups with vProxy Engine

262 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

4. To delete debug logs older than a certain number of days, select Delete debug logs after, and then specify the number of days with a number between 1 and 32767 days. The default value is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in the logs folder at \MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becoming too large.

5. To limit the backup history of the databases on the General page to a set number of days, type or select a number in the Days of backup history field.

The default value is 7 days.

If no level full backups are found in the specified time range, you are prompted for confirmation to load the latest full backup.

6. To use the client name that is provided as is without converting it to the fully qualified domain name (FQDN), select Exclude client name resolution.

Use this option when you restore to a virtual machine in a different domain that does not have name resolution for the source client.

7. To specify the PowerProtect appliance, under Mount Method, perform the following steps:

a. Beside Appliance Host, click ...

The PowerProtect Data Manager List & Lockbox Settings window appears.

The details for the PowerProtect appliance that protects the SQL Server in a protection policy automatically appear.

b. If you do not see the PowerProtect appliance that you want to use for the mount operation, click Add, and then in the Add PowerProtect Data Manager details dialog box, perform one of the following actions:

l To add an PowerProtect with credential-based authentication, specify the appliance hostname and the login credentials.

Contact the PowerProtect administrator to retrieve the PowerProtect appliance host and login details.

l To add an PowerProtect with certificate-based authentication, specify only the appliance hostname. Do not specify the username and password fields.

To use certificate-based authentication, the PowerProtect administrator must whitelist the target Microsoft application agent.

The PowerProtect administrator can approve (whitelist) the target Microsoft application agent on the PowerProtect Infrastructure > Application Agents page.

c. Select the PowerProtect appliance that will mount the backup, and then click OK.

8. To mount the database for instant access, click Mount.

Monitor the instant access mount operation After an instant access mount operation is run from the Microsoft app agent for vProxy Engine SSMS plug-in, the Instant Access > Monitor page displays the restore script and status.

Note: For information about the success or failure of the mount operation, review the log files that are located in the installation folder. The typical location of the log files is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 263

Configure vMotion data movement After you mount a database for instant access, use the Instant Access > Active Mounts page configure vMotion data movement.

About this task

Note: Once vMotion is started, you cannot cancel the vMotion data movement.

Procedure

1. From the left panel, click Active Mounts.

The Active Mounts page appears as shown in the following figure.

Figure 65 vProxy Engine: Instant Access Active Mounts page

2. To update the table and list available datastores, click Show datastores.

3. Select the datastore to which you want the virtual disk to be migrated.

The vdisks will be allocated from the selected datastore. Ensure that the database administrator checks with the data center administrator or backup administrator about the appropriate datastore to select.

4. In the Disk Provisioning field, select the vdisk provisioning mode to be used for the vMotion operation.

5. Click Migrate.

Results

The virtual disk is migrated to the selected datastore by using storage vMotion. You can observe the progress in the Monitor window. Once the vMotion is complete, the mount is removed from

Restoring Virtual Machine Backups with vProxy Engine

264 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

the Active Mounts page as the databases are then on permanent VMDKs on the vCenter datastore.

Manage the mounted database After you mount a database for instant access, use the Instant Access > Active Mounts page to manage the mount session.

About this task

All settings on the Instant Access > Active Mounts page are optional. If you do not manually dismount the database, the database will be dismounted when the mount timeout period passes, as specified on the Instant Access > Options page.

Note: After the mount starts, you can extend the mount timeout by clicking Extend, which extends the mount timeout by the initial timeout value that was set during the mount. To preserve any changes that you make to the database during the instant access active time, you can vMotion the database.

Procedure

1. From the left panel, click Active Mounts.

The Active Mounts page appears as shown in the following figure.

Figure 66 vProxy Engine: Instant Access Active Mounts page

The Active Mounts table displays the details for each active mount session.

2. From the Active Mounts table, select the backup that you want to dismount.

Note: All changes to the database will be lost. To preserve the changes, select to vMotion the database instead or extend the mount timeout.

Restoring Virtual Machine Backups with vProxy Engine

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 265

3. Click Dismount.

The backup is dismounted.

Restoring Virtual Machine Backups with vProxy Engine

266 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

PART 4

Troubleshooting

This part includes the following chapters:

Chapter 9, "Troubleshooting Resources"

Chapter 10, "Troubleshooting Application Direct Issues"

Chapter 11, "Troubleshooting Storage Direct Issues"

Chapter 12, "Troubleshooting vProxy Engine Issues"

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 267

Troubleshooting

268 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 9

Troubleshooting Resources

This chapter includes the following sections:

l Error codes in the msagentadmin administration command output......................................270 l Expiry tool command return (error) codes...........................................................................270

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 269

Error codes in the msagentadmin administration command output

The Microsoft application agent enables the msagentadmin administration command to report the severity of the error and the unique message IDs that associate with the error.

The following table lists the return codes and description:

Table 17 Return codes and description

Return code Description

0 Success

1 Error or notice

2 Warning

3, 4, or 5 Major error

Only the return code 0 indicates that the operation has succeeded. Other return codes indicate failure.

Note: The return codes are mapped to the severity, which is set when the error occurs. Potential errors, which you cannot control, can occur at any time. The severity of only a few errors are consistently or correctly set. So, use the return codes only as a hint or a guide.

Expiry tool command return (error) codes The Microsoft application agent enables the expiry tool to report the severity of the error and the unique message IDs that associate with the error.

The following table lists the return codes and description:

Table 18 Return codes and description

Return code Description

0 Success

1 Error or notice

2 Warning

3, 4, or 5 Major error

Only the return code 0 indicates that the operation has succeeded. Other return codes indicate failure.

Note: The return codes are mapped to the severity, which is set when the error occurs. Potential errors that you cannot control can occur at any time. The severity of only a few errors are consistently or correctly set. Use the return codes only as a hint or a guide.

Troubleshooting Resources

270 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Examples

l When you perform a delete operation, and when there are no backups in the specified save time range, the following error appears:

C:\Program Files\DPSAPPS\MSAPPAGENT\bin>ddbmexptool -d -z c:\tmp\config.txt - e "10 days ago" -n mssql 108012:ddbmexptool:The media database range lookup could not find any save sets in the specified range. C:\Program Files\DPSAPPS\MSAPPAGENT\bin>echo %errorlevel% 2

This error does not need your intervention.

l When you perform a delete operation, and when you incorrectly specified the application ID, the following error appears:

C:\Program Files\DPSAPPS\MSAPPAGENT\bin>ddbmexptool -d -z c:\tmp\config.txt - e "10 days ago" -n mssqly 127178:ddbmexptool:Application name 'mssqly' is unknown. Supported application names are: mssql. C:\Program Files\DPSAPPS\MSAPPAGENT\bin>echo %errorlevel% 5

This error needs your intervention to correctly specify the application ID.

Troubleshooting Resources

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 271

Troubleshooting Resources

272 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 10

Troubleshooting Application Direct Issues

This chapter includes the following sections:

l SQL Server Management Studio plug-in is hidden...............................................................274 l Instant file initialization warning appears............................................................................. 274 l Application Direct full backup might fail...............................................................................274 l Restore with tail-log backup fails when full backups are tiered to the cloud........................ 275 l Issues encountered with the backup discovery tool.............................................................275

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 273

SQL Server Management Studio plug-in is hidden Issue

In the Microsoft SQL Server Management Studio (SSMS), the Microsoft app agent for Application Direct plug-in and the Microsoft app agent for Storage Direct plug-in can be hidden.

This issue occurs when the SSMS toolbar does not have room to display the Microsoft app agent plug-in button.

Workaround

On the far right of the toolbar, click to display the hidden Microsoft app agent plug-in button. To unhide the button from the toolbar, customize the toolbar to dock the Microsoft app agent plug-in button at the top.

Instant file initialization warning appears During a Application Direct SQL Server restore operation, if you did not enable the instant file initialization feature on the SQL Server, the following warning message appears:

Instant file initialization is not enabled; please enable this feature for improved restore performance.

This warning does not prevent the restore operation from completing successfully.

The Microsoft SQL Server documentation provides information about how to enable the database instant file initialization feature on the SQL Server.

Application Direct full backup might fail Issue

An Application Direct full backup might fail with the following type of error message:

VMDirectProtection failed. Backup has FAILED. Backup of the application "MSSQLDM Agent" on the virtual machine "vmdirect-sql1" has failed: Backup of the application "MSSQLDM Agent" on the virtual machine "vmdirect-sql1" has failed.: PowerProtect agent for Microsoft Applications command error: exit status 3

The following message appears in the vProxy FLR Agent log C:\Program Files (x86)\EMC \vProxy FLR Agent\logs\vflragentd\vflragentd-agent.log in the failing virtual machine:

msagentcon: Microsoft CRT error: R6010

Workaround

Apply the latest Windows update on the virtual machine host.

Troubleshooting Application Direct Issues

274 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Restore with tail-log backup fails when full backups are tiered to the cloud

Issue

When full backups are tiered to the cloud and you try to perform a restore with tail-log backups enabled, the tail-log backup succeeds but the restore fails and the database is left in the restoring state. As a result, the database is unavailable for user transactions and the database is skipped during subsequent full and tail-log backups.

Note: The database remains in the restoring state until the full backups are recalled to the Data Domain storage unit and you perform a restore for the database.

Workaround

After the tail-log backup is performed and the database is left in the restoring state.

If your goal is to restore the database from the backup that you selected:

1. Contact the PowerProtect administrator to recall the associated full backup.

2. On the options page, disable the tail-log backup.

3. Perform the restore of the selected database again.

If your goal is to return the database on disk to an operational state without performing the database restore:

1. Use the SSMS GUI or CLI to perform a flat file restore only for the tail-log backup.

2. Use the SQL native plug-in to apply the tail-log backup.

Issues encountered with the backup discovery tool To enable the PowerProtect Data Manager management of existing backups after you have upgraded from a previous version of Microsoft application agent, you must run the backup discovery tool, AgentBackupDiscovery.exe. The PowerProtect Microsoft Application Agent Installation Guide provides details about the backup discovery tool.

You might encounter the following issues when you run the backup discovery tool, AgentBackupDiscovery.exe:

l When you try to run the backup discovery tool, the program might not start. Instead the program displays the following error message:

Backup discovery is in progress. Please wait for it to complete.

This message appears when an ongoing backup discovery process is running, as invoked by the PowerProtect Data Manager to discover all the breadcrumbs generated for existing backups. When the discovery process is complete, you can run the backup discovery tool.

l When the Microsoft application agent is installed in a non-default directory, the backup discovery tool might not generate the expected breadcrumbs.

As a workaround for this issue, manually create the brownfield_breadcrumbs directory in the non-default installation directory and then rerun the backup discovery tool.

Troubleshooting Application Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 275

Troubleshooting Application Direct Issues

276 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 11

Troubleshooting Storage Direct Issues

This chapter includes the following sections:

l Troubleshooting mount failures........................................................................................... 278 l SQL Server Management Studio plug-in is hidden...............................................................279 l Failed to set up SymAPi handle: Unable to list VMax arrays :

SYMAPI_C_NO_SYMM_DEVICES_FOUND....................................................................... 280 l Rollback restore fails with the error "The process cannot access the file".......................... 280 l ResyncLuns: SymSnapvxControl failed for Target Device = 01441. Error: The Device(s) is

(are) already in the desired state or mode........................................................................... 281 l Rollback restore fails when the VMAX LUNs are unavailable................................................281 l The log file contains messages about VSS snapshot failure with code 0x80042306............282 l Registry keys are overwritten when the Solutions Enabler is installed after the Microsoft

application agent................................................................................................................. 282 l Remove the link between the source devices and the backup (FTS) devices on Data Domain

and terminate the snapvx session........................................................................................283

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 277

Troubleshooting mount failures Sometimes the mount operations fail because vdisks are in the locked/in use state.

About this task

To troubleshoot the problem, perform the following steps:

Procedure

1. View the status of the vdisks by running the following command:

msagentadmin devmaint -z

Consider the following example command:

msagentadmin devmaint -z C:\Only-Vmax-DD-Config-Details.txt

Output similar to the following appears:

Physical Device World Wide Name Data Domain Device Restore Pool Restore Group \\.\PHYSICALDRIVE5 600218800000008e4d057b6d30c037be vdisk- dev1979 esx_pool E16Vmax10-31-228-167.dg [locked/in use] \\.\PHYSICALDRIVE6 600218800000008e4d057b6d30c037bf vdisk- dev1980 esx_pool E16Vmax10-31-228-167.dg [locked/in use] \\.\PHYSICALDRIVE7 600218800000008e4d057b6d30c037c0 vdisk- dev1981 esx_pool E16Vmax10-31-228-167.dg [locked/in use]

2. Unlock the vdisks by running the following command:

msagentadmin devmaint -z --clear *

Consider the following example command:

msagentadmin devmaint -z C:\Only-Vmax-DD-Config-Details.txt --clear *

Output similar to the following appears:

Forcing a clear (unlock) on device 600218800000008e4d057b6d30c037be '\\.\PHYSICALDRIVE5' cleared (was locked by 'E16Node1-Vmax.PP- Vmax.MsAppQA:26C152C9-7082-45E0-9BC4-2BFCBD6975C4'). Forcing a clear (unlock) on device 600218800000008e4d057b6d30c037bf '\\.\PHYSICALDRIVE6' cleared (was locked by 'E16Node1-Vmax.PP- Vmax.MsAppQA:26C152C9-7082-45E0-9BC4-2BFCBD6975C4'). Forcing a clear (unlock) on device 600218800000008e4d057b6d30c037c0 '\\.\PHYSICALDRIVE7' cleared (was locked by 'E16Node1-Vmax.PP- Vmax.MsAppQA:26C152C9-7082-45E0-9BC4-2BFCBD6975C4'). Use the command 'delete shadows' to delete orphan VSS shadow sets if necessary. Physical Device World Wide Name Data Domain Device Restore Pool Restore Group

Troubleshooting Storage Direct Issues

278 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

\\.\PHYSICALDRIVE5 600218800000008e4d057b6d30c037be vdisk- dev1979 esx_pool E16Vmax10-31-228-167.dg \\.\PHYSICALDRIVE6 600218800000008e4d057b6d30c037bf vdisk- dev1980 esx_pool E16Vmax10-31-228-167.dg \\.\PHYSICALDRIVE7 600218800000008e4d057b6d30c037c0 vdisk- dev1981 esx_pool E16Vmax10-31-228-167.dg

3. Delete the stale entries or orphan VSS shadow sets:

a. Run the diskshadow.exe command.

b. To delete the shadows, type delete shadows all, and press Enter.

c. To exit the command prompt, type Exit, and press Enter.

4. Delete all the entries in the \config\mounts folder.

Note: Performing this step dismounts all the active mounts.

5. To ensure that the vdisks are unlocked, view the status of the vdisks by running the following command:

msagentadmin devmaint -z

Consider the following example command:

msagentadmin devmaint -z C:\Only-Vmax-DD-Config-Details.txt

Output similar to the following appears:

Physical Device World Wide Name Data Domain Device Restore Pool Restore Group \\.\PHYSICALDRIVE5 600218800000008e4d057b6d30c037be vdisk- dev1979 esx_pool E16Vmax10-31-228-167.dg \\.\PHYSICALDRIVE6 600218800000008e4d057b6d30c037bf vdisk- dev1980 esx_pool E16Vmax10-31-228-167.dg \\.\PHYSICALDRIVE7 600218800000008e4d057b6d30c037c0 vdisk- dev1981 esx_pool E16Vmax10-31-228-167.dg

SQL Server Management Studio plug-in is hidden Issue

In the Microsoft SQL Server Management Studio (SSMS), the Microsoft app agent for Application Direct plug-in and the Microsoft app agent for Storage Direct plug-in can be hidden.

This issue occurs when the SSMS toolbar does not have room to display the Microsoft app agent plug-in button.

Troubleshooting Storage Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 279

Workaround

On the far right of the toolbar, click to display the hidden Microsoft app agent plug-in button. To unhide the button from the toolbar, customize the toolbar to dock the Microsoft app agent plug-in button at the top.

Failed to set up SymAPi handle: Unable to list VMax arrays : SYMAPI_C_NO_SYMM_DEVICES_FOUND

Issue

The hardware provider fails and logs a message similar to the following:

Failed to set up SymAPi handle: Unable to list VMax arrays : SYMAPI_C_NO_SYMM_DEVICES_FOUND

Workaround

Ensure that the Solutions Enabler database is up-to-date by running the following command:

symcfg discover

Rollback restore fails with the error "The process cannot access the file"

Issue

Rollback restore fails with following error:

CreateFile(\\.\PHYSICALDRIVE ), 0x80070020, The process cannot access the file because it is being used by another process.

VSS requires exclusive access to the devices that you restore so that it can change their status to offline to perform a volume restore. During the volume restore, if any processes access these devices, VSS fails and the restore aborts. The devices are offline. You must manually change their status to online.

Workaround

Ensure that the following rollback requirements are met:

l Ensure that you have provisioned the array according to the Solutions Enablers recommendations. The Solutions Enabler documentation provides information about provisioning arrays for optimal performance.

l Ensure that external programs, for example, Windows Disk Management, do not use the disks.

Troubleshooting Storage Direct Issues

280 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

ResyncLuns: SymSnapvxControl failed for Target Device = 01441. Error: The Device(s) is (are) already in the desired state or mode

Issue

The VMAX hardware provider log file contains the following message:

ResyncLuns: SymSnapvxControl failed for Target Device = 01441. Error: The Device(s) is (are) already in the desired state or mode

This error indicates that the snapshot is not properly closed.

Workaround

1. List the STD devices by running the following command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> list

2. In the output, if the R flag contains X for the snapshot, delete the snapshot by running the following command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> -snapshot_name <Snapshot_Name> terminate -restored

Rollback restore fails when the VMAX LUNs are unavailable Issue

To perform rollback restores, the VMAX hardware provider uses temporary restore LUNs. If the restore LUNs are not available, the resyncluns operation fails and displays the following message:

ResyncLuns: Failed to select restore eLUN for Static Image

When you provision a new VMAX array with production LUNs, you must additionally provide at least one eLUN. When you perform a restore, the array uses the eLUN to instantiate static images before it copies the images to the production LUN.

To select an eLUN, ensure that you meet the following requirements:

l The size of the eLUN is either more than or the same as the size of the static image to restore.

l The eLUN is a Data Domain-encapsulated device.

l The array can access the eLUN.

l The eLUN is in the ready state. If the VMAX hardware provider cannot find the restore eLUNs, perform the following steps to ensure that the array is in the restorable state:

Workaround

1. If you are using the Windows Disk Management program, ensure that all of the restore eLUNs are offline. Otherwise, when the VSS brings the restored volume online, Windows will detect two disks with identical disk signatures. This causes the resync restore operation to fail and can introduce instability to the array.

Troubleshooting Storage Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 281

2. Ensure that the restore eLUNs do not have snapshots linked to them by running the following command for each restore eLUN:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> list

For example: symsnapfx -sid 031 -devs 03E list 3. If the output of the command in step 2 does not contain the No snapshot was found message,

delete the snapshot by running the following command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> -snapshot_name <Snapshot_Name> terminate

For example: symsnapvx -sid 031 -devs 03E -name VSS_121938_10192016 terminate

4. Move the eLUN to the ready state by running the following command:

symdev -sid <Symmetrix_VMAX_ID> ready -devs <STD_Device_ID>

For example: symdev -sid 031 ready 03E

The log file contains messages about VSS snapshot failure with code 0x80042306

Issue

The log files contain messages about the VSS snapshot failure with the code 0x80042306.

Workaround

Disable the VSS Storage Direct hardware provider:

1. By using the administrator command prompt, go to the <Product_Installation_Folder>\MSAPPAGENT\bin folder.

2. Unregister the VSS Storage Direct hardware provider service by running the following command:

regsvr32 /u VSSPPHwp.dll

3. Unload the VSS Storage Direct hardware provider service by performing one of the following steps:

l Wait for approximately 15 minutes for the service to automatically unload.

l Restart the host.

Registry keys are overwritten when the Solutions Enabler is installed after the Microsoft application agent

Issue

The Solution Enabler should be installed before the Microsoft application agent.

Troubleshooting Storage Direct Issues

282 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

If you install the Solution Enabler after you install the Microsoft application agent, the VMAX registry key settings are overwritten with the Microsoft application agent default settings.

Workaround

Use the following steps to manually set registry keys:

1. Run the following commands, which are mandatory to set registry keys:

a. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /v "EnforceTimefinderVX" /t REG_SZ /d "True"

b. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /v "SelectVXTarget" /t REG_SZ /d "ANY"

c. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /v "RetainVXTarget" /t REG_SZ /d "True"

d. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /v "VXTimeToLive" /t REG_SZ /d "1"

e. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /v "SymmetrixStaticMount" /t REG_SZ /d "True"

2. (Optional) To create the C:\Program Files\EMC\SYMAPI\log\hwprov.txt log file that contains full debug information, run the following additional commands. This step is useful when you need to provide full debug information while contacting support.

a. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /f /v "LogFile" /t REG_SZ /d "hwprov.txt"

b. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /f /v "LogLevel" /t REG_SZ /d "Debug"

c. reg add "HKLM\SOFTWARE\EMC\ShadowCopy" /f /v "LogPath" /t REG_SZ /d "C:\Program Files\EMC\SYMAPI\log"

Remove the link between the source devices and the backup (FTS) devices on Data Domain and terminate the snapvx session

Issue

You may be required to remove the link between the source devices and the backup (FTS) devices on Data Domain and terminate the snapvx session.

NOTICE Perform this procedure with caution. This action will force all blocks to move in the next backup.

Workaround

1. Identify the snapshot to delete or clean up by running the following command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> list

Troubleshooting Storage Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 283

2. Unlink the source device and the backup device by running the following command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> -lndevs <Backup_Device_ID> -snapshot_name <Snapshot_Name> unlink -symforce

3. Delete the snapshot by running the following command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> -snapshot_name <Snapshot_Name> terminate

Note: This procedure does not delete the snapshots on Data Domain.

Troubleshooting Storage Direct Issues

284 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

CHAPTER 12

Troubleshooting vProxy Engine Issues

This chapter includes the following sections:

l Configuring the debug level with the msagentcon.exe program.......................................... 286 l Restore fails when a full backup has been moved to the cloud............................................ 286 l Restore with tail-log backup fails when full backups are tiered to the cloud........................ 287 l Application-aware virtual machine full backup might fail......................................................287 l Full backup might fail when a virtual machine has many SQL databases..............................288 l SQL AAG transaction log backup might not be performed.................................................. 288 l Restore keeps running when the backup is in the cloud.......................................................288 l Transaction log backup depends on last backup before upgrade......................................... 289 l Unable to protect a virtual machine with application agent installed in Application Direct mode

............................................................................................................................................ 289

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 285

Configuring the debug level with the msagentcon.exe program You can configure the Microsoft application agent debug level for backups by using the msagentcon.exe program, which is installed with the software in the directory C:\Program Files\DPSAPPS\MSAPPAGENT\bin.

Run the program as follows, where is the debug level from 0 to 9. The default debug level is 0:

msagentcon.exe --administration --debug=

For example:

C:\Program Files\DPSAPPS\MSAPPAGENT\bin> .\msagentcon.exe --administration -- debug=9

Successfully set debug level to '9'. Subsequent 'msagentcon' commands will use this value.

When you set the debug level to a value from 1 to 9, the Microsoft application agent generates the debug logs on the virtual machine when the PowerProtect protection group runs. To deactivate the debug logs, set the debug level to 0.

Restore fails when a full backup has been moved to the cloud Issue

When you try to restore a backup after an associated full backup has been moved to the cloud using Data Domain Cloud Tier, the restore operation fails with the following error message:

"reason" : "Missing or invalid value specified for property 'copyId'"

This error occurs when you try to restore either a full backup that has been tiered to the cloud or a tail-log backup when the associated full backup has been tiered to the cloud. For example, the following full and tail-log backups are performed at the specified times:

l FULL1: 10:00 a.m. (in cloud tier)

l TLOG1: 10:30 a.m.

l TLOG2: 11:00 a.m.

l FULL2: 11:15 a.m. (in active tier)

l TLOG4: 11:30 a.m.

l TLOG5: 12:00 p.m.

In this case, the restore of the FULL1, TLOG1, or TLOG2 backup fails with the error message because the FULL1 backup has been tiered to the cloud. The restore of the FULL2, TLOG4, or TLOG5 backup succeeds because the FULL2 backup is in the active tier.

Workaround

Contact the PowerProtect administrator to recall the associated full backup (FULL1 in this example) from the cloud tier to the active tier, and then perform the restore.

Troubleshooting vProxy Engine Issues

286 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Restore with tail-log backup fails when full backups are tiered to the cloud

Issue

When full backups are tiered to the cloud and you try to perform a restore with tail-log backups enabled, the tail-log backup succeeds but the restore fails and the database is left in the restoring state. As a result, the database is unavailable for user transactions and the database is skipped during subsequent full and tail-log backups.

Note: The database remains in the restoring state until the full backups are recalled to the Data Domain storage unit and you perform a restore for the database.

Workaround

After the tail-log backup is performed and the database is left in the restoring state.

If your goal is to restore the database from the backup that you selected:

1. Contact the PowerProtect administrator to recall the associated full backup.

2. On the options page, disable the tail-log backup.

3. Perform the restore of the selected database again.

If your goal is to return the database on disk to an operational state without performing the database restore:

1. Use the SSMS GUI or CLI to perform a flat file restore only for the tail-log backup.

2. Use the SQL native plug-in to apply the tail-log backup.

Application-aware virtual machine full backup might fail Issue

An application-aware virtual machine full backup might fail with the following type of error message:

VMDirectProtection failed. Backup has FAILED. Backup of the application "MSSQLDM Agent" on the virtual machine "vmdirect-sql1" has failed: Backup of the application "MSSQLDM Agent" on the virtual machine "vmdirect-sql1" has failed.: PowerProtect agent for Microsoft Applications command error: exit status 3

The following message appears in the vProxy FLR Agent log C:\Program Files (x86)\EMC \vProxy FLR Agent\logs\vflragentd\vflragentd-agent.log in the failing virtual machine:

msagentcon: Microsoft CRT error: R6010

Workaround

Apply the latest Windows update on the virtual machine host.

Troubleshooting vProxy Engine Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 287

Full backup might fail when a virtual machine has many SQL databases

Issue

When a virtual machine has a large number of SQL databases, a full backup might fail with the following type of error message in the PowerProtect Data Manager logs:

Unable to create snapshot. Unable to take a snapshot for virtual machine 'vm-161' after three attempts. Unable to create snapshot: An error occurred while quiescing the virtual machine. See the virtual machine's event log for details. (1007)

As a possible reason for the backup failure, the SQL server might be unable to create worker threads when the maximum limit of worker threads is reached.

Workaround

In such a case, you can increase the maximum limit of worker threads by running the following SQL commands in SSMS:

USE master GO EXEC sp_configure 'show advanced options', 1; GO RECONFIGURE; exec sp_configure 'max worker threads', 900 GO RECONFIGURE;

SQL AAG transaction log backup might not be performed When the configured value of @@SERVERNAME is different from the local hostname, the transaction log backup is not performed for a SQL Always On availability group (AAG).

The following Microsoft instructions describe the procedure to change the computer name for a SQL stand-alone instance:

https://docs.microsoft.com/en-us/sql/database-engine/install-windows/rename-a-computer- that-hosts-a-stand-alone-instance-of-sql-server?view=sql-server-2017

Restore keeps running when the backup is in the cloud Issue

A restore through the SQL Server Management Studio (SSMS) keeps running when the full backup that is being restored is in the cloud. The restore displays the following type of error message but continues to run:

ddbmsqlrc: Unable to recover data with save time ' '. Recall the file ' ' from Data Domain Cloud Tier, and restart the recovery.

Workaround

Recall the full backup from the cloud, and retry the restore operation.

Troubleshooting vProxy Engine Issues

288 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Transaction log backup depends on last backup before upgrade

Issue

When the first backup after an upgrade to Microsoft application agent 19.1 is a transaction log backup, the backup fails when the last backup before the upgrade was a full backup. The failed backup produces the following error message in the ddmsqlsv log:

All databases or instances skipped.

Workaround

After an upgrade to Microsoft application agent 19.1, perform a full backup and then a transaction log backup.

Unable to protect a virtual machine with application agent installed in Application Direct mode

Issue

You cannot protect the SQL host with both vProxy Engine (VM Direct) and Application Direct.

You cannot add a virtual machine to a PowerProtect application-aware protection policy when the virtual machine already has an application agent installed in Application Direct mode.

The installer fails when you try to install the Microsoft application agent on a system where the application agent is already installed and the selected installation mode does not match the currently installed product. The installer log is located in the AppData directory for the user account that is configured for the PowerProtect application-aware protection policy.

For example, if Administrator is the user account for the protection policy, the installer log on the virtual machine is located in the directory C:\users\Administrator\AppData\Local\Temp. In this directory, the installer log files are named Microsoft_Application_Agent_ .log.

Workaround

If your goal is to switch the protection type from Application Direct to virtual machine application- aware:

1. On the target virtual machine, remove the Microsoft application agent.

2. Reinstall the Microsoft application agent.

3. Remove the virtual machine from the PowerProtect application-aware protection policy, if needed.

4. Ad

Manualsnet FAQs

If you want to find out how the 19.1 Dell works, you can view and download the Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide on the Manualsnet website.

Yes, we have the SQL Server User Guide for Dell 19.1 as well as other Dell manuals. All you need to do is to use our search bar and find the user manual that you are looking for.

The SQL Server User Guide should include all the details that are needed to use a Dell 19.1. Full manuals and user guide PDFs can be downloaded from Manualsnet.com.

The best way to navigate the Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide is by checking the Table of Contents at the top of the page where available. This allows you to navigate a manual by jumping to the section you are looking for.

This Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide consists of sections like Table of Contents, to name a few. For easier navigation, use the Table of Contents in the upper left corner.

You can download Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide free of charge simply by clicking the “download” button in the upper right corner of any manuals page. This feature allows you to download any manual in a couple of seconds and is generally in PDF format. You can also save a manual for later by adding it to your saved documents in the user profile.

To be able to print Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide, simply download the document to your computer. Once downloaded, open the PDF file and print the Dell Microsoft App Agent 19.1 Data Protection SQL Server User Guide as you would any other document. This can usually be achieved by clicking on “File” and then “Print” from the menu bar.