dell emc powerprotect microsoft application agent sql ... · dell emc powerprotect microsoft...

294
Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Upload: others

Post on 17-May-2020

138 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Dell EMC PowerProtect MicrosoftApplication AgentVersion 19.2

SQL Server User Guide302-005-993

REV 01

September 2019

Page 2: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 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 EMCHopkinton, Massachusetts 01748-91031-508-435-1000 In North America 1-866-464-7381www.DellEMC.com

2 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 3: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

9

11

Preface 13

Configuring the Microsoft Application Agent 17

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

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

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

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

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

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

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

Required privileges for backup and recovery of a stand-alone server...45Required privileges for backup and recovery of an Always On availabilitygroup................................................................................................... 45Required privileges for backup and recovery of a Failover ClusterInstance or Always On Failover Cluster Instance..................................46Required privileges for backup and recovery of a Domain IndependentAlways On availability group.................................................................46Required privileges to view and delete save sets with the ApplicationDirect expiry tool (ddbmexptool) .........................................................47Required user privileges to manage save sets and list client and storageunit information with msagentadmin.exe ............................................. 47Adding a user to a Windows policy....................................................... 47

Figures

Tables

Part 1

Chapter 1

Chapter 2

CONTENTS

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 3

Page 4: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Commands to create and manage the lockbox.....................................50Create a lockbox.................................................................................. 52

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

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

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

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

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

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

Backing Up SQL Server 83

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

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

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

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

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

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

Deleting backups............................................................................................. 123Delete backups with the msagentadmin administration command...... 123

Chapter 3

Part 2

Chapter 4

Contents

4 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 5: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Delete backups with the ddbmexptool expiry tool...............................125

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

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

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

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

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

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

Restoring SQL Server 155

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

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

Performing table-level recovery...................................................................... 179Table-level restore workflow...............................................................179Launching the Microsoft app agent for Application Direct SSMS plug-in........................................................................................................... 179Configure general table restore settings.............................................180Configure optional table restore settings.............................................181Monitor the table restore mount operation ........................................ 183Restore table-level data using ItemPoint............................................ 183

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

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

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

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

Chapter 5

Part 3

Chapter 6

Chapter 7

Contents

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 5

Page 6: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Restoring SQL Server databases using the Microsoft app agent forStorage Direct SSMS plug-in..............................................................192Restore SQL Server databases using the Storage Direct restorecommand............................................................................................199Restore SQL Server databases with T-SQL scripts............................204

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

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

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

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

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

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

Performing SQL Server table-level recovery to a virtual machine................... 248Restore SQL Server tables with the VM Direct SSMS plug-in........... 248Restore SQL Server tables with the VM Direct recover command.....255

Performing an instant access recovery........................................................... 259Instant access recovery overview ..................................................... 259Instant access recovery use cases..................................................... 259Perform an instant access restore with the VM Direct SSMS plug-in 260

Troubleshooting 271

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

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

Troubleshooting Storage Direct Issues 281Troubleshooting mount failures.......................................................................282

Chapter 8

Part 4

Chapter 9

Chapter 10

Chapter 11

Contents

6 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 7: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

SQL Server Management Studio plug-in is hidden.......................................... 283Failed to set up SymAPi handle: Unable to list VMax arrays :SYMAPI_C_NO_SYMM_DEVICES_FOUND...................................................284Rollback restore fails with the error "The process cannot access the file"......284ResyncLuns: SymSnapvxControl failed for Target Device = 01441. Error: TheDevice(s) is (are) already in the desired state or mode...................................285Rollback restore fails when the VMAX LUNs are unavailable...........................285The log file contains messages about VSS snapshot failure with code0x80042306................................................................................................... 286Registry keys are overwritten when the Solutions Enabler is installed after theMicrosoft application agent............................................................................ 286Remove the link between the source devices and the backup (FTS) devices onData Domain and terminate the snapvx session...............................................287

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

Chapter 12

Contents

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 7

Page 8: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Contents

8 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 9: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

1

2

3456789

1011121314151617181920212223242526272829303132333435363738394041424344454647484950

FIGURES

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 9

Page 10: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Specifying the restore point............................................................................................236VM Direct: Database Restore Files page......................................................................... 238VM Direct: Database Restore Options page.................................................................... 239VM Direct: Database Restore Monitor page....................................................................242VM Direct: Table Restore General page.......................................................................... 249VM Direct: Table Restore Options page...........................................................................251VM Direct: Table Restore Monitor page..........................................................................253ItemPoint Data Wizard: select the source files................................................................254ItemPoint Data Wizard: select the target server............................................................. 254ItemPoint Data Wizard: select the source files................................................................257ItemPoint Data Wizard: select the target server............................................................. 258VM Direct: Instant Access General page..........................................................................261Specifying the access point............................................................................................ 262VM Direct: Instant Access Options page.........................................................................263VM Direct: Instant Access Active Mounts page.............................................................. 266VM Direct: Instant Access Active Mounts page...............................................................267VM Direct: Instant Access Active Mounts page.............................................................. 268VM Direct: Instant Access Active Mounts page.............................................................. 269

515253545556575859606162636465666768

Figures

10 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 11: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

123456789101112131415161718

TABLES

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 11

Page 12: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Tables

12 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 13: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Preface

As part of an effort to improve product lines, periodic revisions of software and hardware arereleased. Therefore, all versions of the software or hardware currently in use might not supportsome functions that are described in this document. The product release notes provide the mostup-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 latestversion 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 agentto back up and restore Microsoft SQL Server.

Audience

This document is intended for the user who configures and uses the Microsoft application agent toback 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

01 September 24,2019

Initial release of this document for Microsoft applicationagent 19.2.

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

l RecoverPoint documentation

l XtremIO documentation

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 13

Page 14: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 withtitle, 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, andsyntax

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 orfor 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 theexample.

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/supportl 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. Theinformation can enable you to resolve a product issue before you contact Support.

To access a product-specific page:

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 theproduct.

Preface

14 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 15: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Knowledgebase

The Knowledgebase contains applicable solutions that you can search for either by solutionnumber (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 thesearch to specific products by typing a product name in the search box, and then selecting theproduct 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 abouteither an account or obtaining a valid support agreement, contact a sales representative. Toget the details of a service request, in the Service Request Number field, type the servicerequest 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 DellService Requests.

Online communities

For peer contacts, conversations, and content on product support and solutions, go to theCommunity 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 cansend feedback to [email protected].

Preface

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 15

Page 16: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Preface

16 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 17: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Page 18: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configuring the Microsoft Application Agent

18 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 19: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 1

Configuring the Data Domain System

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

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

This chapter includes the following sections:

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

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 19

Page 20: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Installing and upgrading the Data Domain operating systemThe Data Domain Operating System Installation Guide provides information about how to install andupgrade 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 agentsoftware. You also require a replication license for both the source and destination DataDomain systems to use the replication feature.

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

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

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

The Data Domain Operating System Command Reference Guide provides complete descriptions ofthe 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 restoreoperations with the Microsoft application agent.

Ensure that the following ports are open on the firewall to enable the Application Direct backupsand 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 systemEvery Data Domain system that supports DD Boost must have a unique name. You can use theDNS 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 pageThe Data Domain Operating System Administration Guide provides information.

The Data Domain Operating System Command Reference Guide provides more information about thecommands 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

Page 21: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

2. Verify whether you have enabled the file system, and the file system is running, by runningthe 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 installationpackage, 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 rightsWhen you enable the Data Domain Boost service for the first time on a Data Domain system, alldatabase servers can access the service by default.

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

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

# ddboost disable# ddboost access del <client_list># 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

Page 22: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

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

If these commands fail to establish access controls, rerun the ddboost enable command toconfigure the default access control that enables all hosts to access the DD Boost service. If thecommands have established access controls, rerunning the ddboost enable command enablesthem. 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 ddboostdisable 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 anycurrent operation. For example, deleting the current clients from the Data Domain Boostaccess list by running the ddboost access del command does not stop a backup that is inprogress. 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 DataDomain 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 servershave DD Boost access rights. If the command output is *, all database servers have the accessrights. 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:aehdb2aehdb2.datadomain.comaehdb3aehdb3.datadomain.comaehdb4aehdb4.datadomain.comaehdb5aehdb5.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

Page 23: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Creating storage unitsCreate one or more storage units on each Data Domain system that you use with the Microsoftapplication agent.

About this task

Ensure that you use a unique storage unit name on a single Data Domain system. However, you canuse 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 withthe 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 pageThe 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 theMicrosoft application agent. You can share a storage unit on a Data Domain system with more thanone client system.

Procedure

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

ddboost storage-unit create <storage_unit_name>

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 thefollowing command:

# ddboost storage-unit delete <storage_unit_name>

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

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

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 23

Page 24: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

(Optional) Configuring quotas for storage unitsProvision 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 youcreate a storage unit or later. The Data Domain Operating System Command Reference Guideprovides 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 MiBl 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 processingYou must configure the distributed segment processing option on the Data Domain system. Theoption 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

Page 25: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 theData Domain file system.

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

Configuring advanced load balancing and link failoverThe advanced load balancing feature balances the load of a data transfer and distributes the loadin 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 GbEconnections. The following restrictions apply to the configuration of the advanced load balancingand 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 GbEinterfaces 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 groupand registering the Data Domain system with the Microsoft application agent, perform thefollowing 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 applicationagent.

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 25

Page 26: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

You can use an interface that is not part of the ifgroup to register with the Microsoftapplication agent. You must register the interface with a resolvable name by using eitherDNS 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 channelDD OS release 5.3 and later support fibre channel (FC) communication between the Data DomainBoost 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 withthe Microsoft application agent.

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

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

To request access to a Data Domain system, the Microsoft application agent specifies the DDBoost-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 SCSIdevices that the database server operating system discovers.

l Issues SCSI commands to the identified generic SCSI devices to transfer Data Domain Boostprotocol 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 ifgroupsrequire the IP transport. You can achieve load balancing and link-level high availability for the DDBoost-over-FC transport through different means.

Configuring the Data Domain System

26 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 27: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

The DD Boost-over-FC communication path applies only between the database server or DataDomain Boost library and the Data Domain system. The DD Boost-over-FC communication pathdoes 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 HBAson the host. The Data Domain Operating System Command Reference Guide and Data DomainOperating System Administration Guide provide information about using the scsitarget command formanaging 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 Domainsystem. A valid dfc-server-name consists of one or more of the following characters:

l lowercase letters (a–z)

l uppercase letters (A–Z)

l digits (0–9)

l underscore (_)

l dash (–)Note: The dot or period character (.) is not valid within a dfc-server-name. Youcannot 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

Page 28: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 permissionsto access the DFC devices.

Managing the DD Boost-over-FC pathThe ifgroup-based advanced load balancing and link failover mechanism does not apply to the FibreChannel transport.

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

Consider the following example:

l The database server has two initiator HBA ports–A and B

l Data Domain System has two FC target endpoints–C and D

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

l You have configured Data Domain system with a DD Boost FC group that contains thefollowing 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 aconnection to the server, the DD Boost-over-FC transport logic within the DD Boost library usesSCSI requests to build a catalog of these 16 generic SCSI devices. The SCSI devices are paths toaccess the DD Boost-over-FC service on the Data Domain System. As part of establishing theconnection to the server, the DD Boost-over-FC transport logic provides the catalog of paths tothe server.

Configuring the Data Domain System

28 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 29: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Selecting the initial pathThe server maintains statistics about the DD Boost-over-FC traffic over the various targetendpoints and known initiators. During the connection setup procedure, path management logic inthe server evaluates these statistics and then selects the path, through which the serverestablishes 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 rebalancingThe server periodically performs dynamic rebalancing when the statistics reveal the followingsituations:

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 forserver-directed path migration. In a future data transfer operation, the server requests that the DDBoost library use a different path from the catalog for subsequent operations.

Client path failoverThe server dynamic rebalancing logic directs the client to use a different path. However, the clientcan 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 theDD Boost library starts sending and receiving data for the connection by using SCSI commandsto /dev/sg21.

Later, the link from the target endpoint C to the switch becomes unavailable. Any subsequentSCSI request that the DFC transport logic submits to /dev/sg21 fails with an error code thatindicates 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 differentphysical component and a different combination of initiator and target endpoints. The DFCtransport logic retires the SCSI request on the selected path, and repeats the process till the DFCtransport logic finds a path that can successfully complete the SCSI request.

Queue-depth constraintsThe specific SCSI device that receives a request is irrelevant to the DD Boost-over-FC solution. AllSCSI 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

Page 30: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Certain client operating systems restrict the number of outstanding I/O requests that theoperating system can simultaneously process over a SCSI device. For example, the Windows SCSIPass-Through Interface mechanism conducts only one SCSI request at a time through each of itsgeneric SCSI devices. When multiple connections (for example, backup jobs) try to use the samegeneric 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 eachadvertised SCSI device. You must advertise multiple SCSI devices on the Data Domain system toovercome performance issues in the case of heavy workloads. The term queue-depth describesthe system-imposed limit on the number of simultaneous SCSI requests on a single device. Clientsystems, such as Windows, the queue depth of which is so low as to impact performance, areconsidered to be queue-depth constrained.

Enabling encrypted file replicationTo 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 theData Domain system, and does not require a restart of the Data Domain file system. The DataDomain Operating System Administration Guide provides information about encrypted file replication.

Data Domain replicationReplicate data to remote Data Domain systems by using Data Domain Replicator. Replicating dataenables you to perform recoveries in the case of disasters.

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

The Microsoft application agent does not initiate or monitor a replication. However, the productcan restore from the replicated copy on a secondary Data Domain system. You must have used theproduct to create the backup on a primary Data Domain system. A Data Domain administratorperforms 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 thesecondary Data Domain system in the Data Domain host setting. There are no secondary DataDomain parameters.

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

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

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

Configuring the Data Domain System

30 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 31: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

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

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

Configuring usage limits of Data Domain resourcesUse either the Data Domain operating system commands or the Data Domain Administration GUIto 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 Domainhost.Capacity limits are based on the used logical space, which depends on the amount of data thatis written to a storage unit before deduplication. Logical capacity is the size of theuncompressed data. For example, when a 1 GB file is written twice to the same empty storageunit, 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 readdata 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 resourcesfor Application Direct operations only.

Data Domain uses the term quota to collectively describe the capacity soft and hard limits of astorage 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 analert. If the administrator has configured a tenant-unit notification list, the Data Domain hostsends an email to each address in the list. The Microsoft application agent can continue to usemore 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 thelimited resource.

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

For example, if there are 10 application agent hosts, the Data Domain administrator must create atleast 10 storage units to limit the storage unit capacity that each application agent host uses. Touse fewer storage units, the administrator must group the application agent hosts and assign thegroup 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 agenthost 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<full_path_to_the_configuration_file> [--debug 9]

Configuring the Data Domain System

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 31

Page 32: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example output of the command:

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

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

Impact of exceeding quota limitsAt the start of a backup, the Microsoft application agent cannot determine how much capacity isrequired for the backup. The Microsoft application agent can perform a requested backup onlywhen 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 DataDomain host sends an email to each address in the list. The list can include the Data Domainadministrator and the application agent user.

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

l The backup or restore operation continues without any adverse impact. The application agentdoes 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, theMicrosoft application agent cancels the backup.

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

145732:(pid 4584):Max DD Stream Count: 60153003:(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 quotaTo configure capacity usage limits for the application agent, the Data Domain administrator mustset 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 thecommand prompt. The Data Domain documentation provides information.

4. Provide the Data Domain hostname, storage unit name, username, and password of thestorage 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

Page 33: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 nextbackup can fail. Data Domain administrators must notify the Microsoft application agentusers when they decrease a capacity quota, so that the application agent users canevaluate the potential impact on backups.

Impact of exceeding the soft stream limitWhen 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 DataDomain host sends an email to each address in the list. The list can include the Data Domainadministrator and the application agent user.

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

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

Impact of exceeding the hard stream limitWhen the Microsoft application agent exceeds the hard stream limit during an operation, theMicrosoft 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 streamsA storage unit can have soft and hard limits for streams. The Data Domain administrator can setindividual soft limits for read, write, and replication streams. The administrator can set a hard limitonly 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 thehard 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 ddbooststorage-unit create command or after creating the storage unit by using theddboost storage-unit modify command. The Data Domain documentation providesinformation.

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

4. Provide the Data Domain hostname, storage unit name, username, and password of thestorage 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

Page 34: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

The Data Domain administrator can use the ddboost storage-unit modify commandto modify the streams limits of storage units. The Data Domain documentation providesinformation.

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

Configuring the Data Domain Cloud Tier for data movement tothe cloud

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

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

The Microsoft application agent supports the DD Cloud Tier for movement of Application Directbackup 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 StorageDirect 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. Forthe self-service restore of such copies, recall the copies to the active tier from PowerProtectData 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 orstorage 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 followingoperations:

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 acollection 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 orrestore. A backup creates one or more save files within a save set. The Microsoft application agentmoves 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

Page 35: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Setting up the DD Cloud Tier policy for data movement to the cloudThe Microsoft application agent moves the backup data from the active tier to the cloud accordingto the DD Cloud Tier policy. To enable the data movement to the cloud, you must set up therequired 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 bythe application that creates the backup files on the Data Domain system. This policy moves thebackup 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 Microsoftapplication agent. An age-based policy moves all the file content (including metadata) from astorage unit to the cloud according to the file age, as when all the files older than T days aremoved. Such data movement by an age-based policy can cause the failure of metadata queriesfor the Microsoft application agent.

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

For any DD OS version earlier than 6.1, the Data Domain administrator must use DD REST APIs tocreate application-managed based policies through tools such as the curl command. Startingwith 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 followingData Domain command from the command line. This command sets the application-based policyfor the specified Mtrees:

data-movement policy set app-managed {enabled | disabled} to-tier cloud cloud-unit <unit-name> mtrees <mtree-list>

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 verificationpurposes:

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

Page 36: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Distributed segment processing allows the Microsoft application agent to perform parts of thededuplication process, which avoids sending duplicate data to the Data Domain system that youconfigured 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 Domainsystem. The throughput improvements depend on the redundant nature of the data that youback up, the overall workload on the database server, and the database server capability. Ingeneral, greater throughput is attained with higher redundancy, greater database serverworkload, and greater database server capability.

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

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

Distributed segment processing supports the following modes of operation for sending backupdata 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 negotiateswith the Data Domain system for the current setting of the option and accordingly performsbackups.

Distributed segment processing enabled modeWhen you enable the distributed segment processing feature, the DD Boost library performs thefollowing 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 DataDomain system. The Data Domain Operating System Administration Guide provides more informationabout local compression and its configuration.

Configuring the Data Domain System

36 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 37: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Distributed segment processing disabled modeWhen you disable the distributed segment processing feature, the DD Boost library sends the datadirectly 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 ExtendedRetention Data Domain system.

Advanced load balancing and link failoverNote: This topic is relevant only if you use an Ethernet connection for backup and restoreoperations 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 applicationagent.

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

Load balancing provides greater physical throughput to the Data Domain system as compared toconfiguring 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 theinterfaces in the group. The advanced load balancing and link failover feature works at theApplication 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 outstandingconnections on the interfaces. The feature balances the load of the connections only for backupand restore jobs.

The file replication connection between Data Domain systems is not part of the load balancing. Youmust 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 forthe 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 interfacethat 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 layeraggregation and failover technologies. You can put the links that connect the database servers andthe switch that connects to the Data Domain system in an aggregated failover mode. Thisconfiguration provides end-to-end network failover functionality. You can use any of the availableaggregation technologies between the database server and the switch.

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

The Data Domain Operating System Administration Guide provides more information about how toconfigure 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

Page 38: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

l Routes subsequent incoming backup jobs to the available interfaces if one of the interfaces inthe 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 multipleinterfaces in the group.

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

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

Configuration restrictionsThe 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 systemsupports only one interface group.

Encrypted managed file replicationBy default, after the database servers authenticate the file replication jobs by using thepreconfigured Application Direct username and password, they set up unencrypted file replicationjobs between two Data Domain systems. If you enable the encrypted file replication feature, whenthe database servers set up a replication job, the session between the source and destination DataDomain systems uses Secure Sockets Layer (SSL) to encrypt all image data and metadata sentover 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 filereplication job, the source and destination systems negotiate the encryption without involving theMicrosoft 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 donot 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 anddestination Data Domain systems that have DD OS 5.0 or later. Encrypted file replication applies toall file replication jobs on the system.

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

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

Data Domain High AvailabilityThe Data Domain High Availability feature enables you to configure two Data Domain systems asan 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

Page 39: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

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

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

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

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 moreinformation about the Data Domain High Availability feature.

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

filesys statusddboost statusifgroup show config interfacesddboost show connectionsddboost storage-unit show compressionddboost storage-unit show

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

The command that you use to validate the communication between the database server and theData 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 thefollowing command:

# rpcinfo -p <Data_Domain_system_hostname>

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

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

Troubleshooting the Data Domain systemThe Knowledgebase Article 334991, which is titled How to troubleshoot DataDomain DD Boostconnectivity 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

Page 40: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Page 41: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 2

Configuring Application Direct

This chapter includes the following sections:

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

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 41

Page 42: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Note: Starting with version 19.2, backups and restores of Microsoft SQL Server on Linux aresupported through the Orchestrated Application Protection feature. For more informationabout the Orchestrated Application Protection feature, refer to the latest Dell EMCPowerProtect Database Application Agent documentation.

Backup and recovery

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

l Backups and restores of Domain Independent Always On availability group databases.

SQL Server 2016 can deploy a Domain Independent Always On availability group with anunderlying Workgroup Cluster that does not require Active Directory Domain Services. TheDomain Independent Always On availability group supports the following combinations for thenodes that make up the Windows Server failover cluster:

n No nodes are joined to a domain.

n All nodes are joined to different domains.

n Nodes are mixed, with a combination of domain-joined and non-domain-joined nodes.

Domain A Domain B Workgroup A Workgroup B

Node 1 Node 2

Node 1 Node 2

Node 1 Node 2

Node1 Node 2

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 restoresin 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 unitor 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.

Configuring Application Direct

42 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 43: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Environmental support

l IPv4 and IPv6 support.

l Coexistence with other backup products that protect data that the Microsoft application agentdoes 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 Microsoftapplication 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 inthe GUI, in the case of Always On availability groups.

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

l Caching data related to SQL Server, SQL Server instances, databases, and other settings onthe General, Files, and Options pages whenever the application agent starts.The application agent also caches the save set information for the duration of a particularsession. Caching saves time by eliminating the need to reselect the settings each time theapplication agent starts, and especially when the SQL Server contains a large number ofdatabases, or a large number of backups for a database.

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

Architecture of the Microsoft application agent forApplication Direct with SQL Server

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

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

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 43

Page 44: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

l Virtual Device Interface: The Microsoft application agent for Application Direct with SQLServer uses a VDI, which is an API provided by SQL Server, to integrate with the SQL Serverand enables the Application Direct with Microsoft application agent to back up and restoreSQL Server data. The Microsoft documentation provides information about the VDItechnology. 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 DataDomain or PowerProtect X400 server.

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

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

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

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

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

Microsoft SQL Server 2008 and later introduce the TDE database-level encryption feature. Thisfeature provides protection for the entire database at rest, without affecting existing applications.

Configuring Application Direct

44 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 45: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

The Microsoft application agent supports SQL data encryption at the cell level, at the full databaselevel 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 dataencryption for SQL VDI.

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

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

Configure a user with the required privileges for SQL ServerApplication Direct operations

The Microsoft application agent requires that the user starting backup and recovery operations isassigned certain privileges from the SQL Server and the Windows application host. The minimumWindows 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 useraccounts.

Required privileges for backup and recovery of a stand-alone serverLearn 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 SQLServer 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 groupLearn about the user requirements for stand-alone backup and recovery.

Required SQL Server roles

Assign the user the following SQL Server roles:

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 45

Page 46: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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. Theusername and password must be the same on each node.

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

Required privileges for backup and recovery of a Failover Cluster Instance orAlways On Failover Cluster Instance

Learn about the user requirements for Failover Cluster Instance or Always On Failover ClusterInstance 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 WindowsAdministrator), you must launch the tool where you will perform the backup or recovery withelevated permissions (run as administrator).

Required privileges for backup and recovery of a Domain Independent AlwaysOn availability group

Assign the required privileges for the backup and recovery of a Domain Independent Always Onavailability group:

l Provide the cluster access to the user from the Workgroup Cluster, for example, USER1. Runthe following command on both nodes to prevent the failure of the Federated SQL backup witha Windows Management Instrumentation (WMI) error:

Grant-ClusterAccess -User USER1 -Full

l Add the user (USER1 from the previous example) to the SQL login and provide the sysadminprivileges.

To enable a Microsoft application agent backup of the Domain Independent Always On availabilitygroup, log in to the SQL nodes as the Domainless\USER1 user. Perform the backup through theMicrosoft app agent for Application Direct SSMS plug-in (GUI) or through the Application Directbackup command ddbmsqlsv, as described in Chapter 4.

Configuring Application Direct

46 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 47: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Any user can use the ddbmexptool command to list and delete save sets as long as the user isgranted access to the lockbox using the msagentadmin command. Administrative privileges arenot required.

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

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

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

Adding a user to a Windows policyProcedure

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.

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

Create a configuration fileCreate 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=<client_or_hostname> Mandatory.

Specifies the application server hostname, to which youwant to back up or restore the databases. In the case ofcluster configurations, specify the name of the clusterinstance.

LOCKBOX_PATH=<full_path_to_lockbox> Optional.

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

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 47

Page 48: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 3 General configuration file parameters (continued)

Parameter Description

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

DEBUG_LEVEL=<debug_level_1_through_9> Optional.

Specifies whether the software writes debug messagesto the debug log file. The default value is 0, in which nodebug messages are generated. The highest level is 9, inwhich 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 defaultvalue is FALSE, in which save sets are listed in ascendingorder.

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=<DD_Boost_username> Mandatory.

Specifies the username of the DD Boost user.

You must register the hostname and the DD Boostusername in the lockbox to enable Microsoft applicationagent to retrieve the password for the registered user.

DEVICE_HOST=<server_name> Mandatory.

Specifies the name of the Data Domain or PowerProtectX400 server that contains the storage unit, to which youwant to back up and restore the databases.

You must register the hostname and the DD Boostusername in the lockbox to enable Microsoft applicationagent to retrieve the password for the registered user.

DEVICE_PATH=<storage_unit_name> Mandatory.

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

DDBOOST_FC={TRUE | FALSE} Optional.

Specifies whether a backup or restore on the primaryData Domain system uses a Fibre Channel (FC) or IPnetwork connection. The default value is FALSE. SpecifyTRUE to use an FC network connection during backupand restore.

Configuring Application Direct

48 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 49: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 4 Primary system configuration file parameters (continued)

Parameter Description

Note: If this parameter is set to TRUE, the primaryData Domain system must be configured to supportan FC connection.

DEVICE_FC_SERVICE=<fibre_channel_server> Mandatory when the DDBOOST_FC parameter is set toTRUE

Specifies the name of the FC service configured on theprimary Data Domain system to be used for a backup orrestore.

DDVDISK_USER=<vdisk_username> Optional.

Specifies the Data Domain vdisk user. If you do notspecify this parameter, the value defaults to theDDBOOST_USER.

Example 1 Example configuration file contents

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

DDBOOST_USER=DD163_userDEVICE_HOST=ledmd035.lss.example.comDEVICE_PATH=/SU_DD163LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox"CLIENT=mw2k8x64sql2.appagentdev.comDEBUG_LEVEL=0

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

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

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

Note: For a PowerProtect X400 system, the PowerProtect Data Manager creates a storageunit and automatically configures the lockbox on the application host. For each PowerProtectprotection policy, a source lockbox and replication target lockbox are created and configuredon the application host.

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

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 49

Page 50: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 locationand grant each remote host individual access to the lockbox.

Note: Do not use a single shared lockbox to perform remote backup operations in a clusterenvironment. 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 theenvironment.

Commands to create and manage the lockboxLockbox 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 PowerProtectData Manager automatically performs the lockbox configuration when the PowerProtectprotection 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 <lockbox_directory>] [--debug 9]

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

Register credentials to the lockbox

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

msagentadmin administration --registerLB --config <config_file_path> [--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 <config_file_path> [--confirm] [--debug 9]

Configuring Application Direct

50 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 51: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 <lockbox_directory>] [-a "LOCKBOX_REMOTE_HOST=<hostname_to_add>"] [-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 <lockbox_directory>] [-a "LOCKBOX_REMOTE_HOST=<hostname_to_delete>"] [--debug 9]

Reset the lockbox

To reset the lockbox, run the following command:

msagentadmin administration --updateLB [--lockbox <lockbox_directory>] [--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=<lockbox_directory>

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 '<lockbox>' in the directory '<lockbox_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.

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 51

Page 52: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

msagentadmin administration --updateLB -a USE_LOCKBOX_PASSPHRASE=TRUE -a LOCKBOX_PATH=<lockbox_directory>

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 '<lockbox>' in the directory '<lockbox_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) thresholdfor the lockbox, run the following command:

msagentadmin administration --updateLB -a SET_LOCKBOX_SECURITY="custom" -a LOCKBOX_PATH=<lockbox_directory>

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

Import the lockbox

To import the lockbox, run the following command:

msagentadmin administration --updateLB -a LOCKBOX_IMPORT=yes -a LOCKBOX_PATH=<lockbox_directory>

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

Create a lockboxUse 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 isC:\Program Files\DPSAPPS\common\lockbox.

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

Configuring Application Direct

52 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 53: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 aData Domain server, add the following credentials:

LOCKBOX_PATH=C:\LockboxesDDBOOST_USER=ddvdiskDEVICE_HOST=ledmd034.lss.emc.comDEVICE_PATH=/ddbdatest/mattp/pp

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

msagentadmin administration --registerLB --config "<config_file_path>"

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 Onavailability groups

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

Note: In addition to the following prerequisites, ensure that you have assigned the requiredpermissions as described in Configure a user with the required privileges for SQL ServerApplication 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 Onavailability group.

Configure the lockbox

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

Prerequisites for clusterless Always On availability group

You must meet the following prerequisites for a clusterless Always On availability group:

l SQL server 2017 and SQL Server Management studio 2017 are installed.

l The CLUSTER_TYPE field is set to NONE. CLUSTER_TYPE must not be set to Windowsserver failover cluster or External.

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 53

Page 54: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Set Readable Secondary settings

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

1. On the SQL Server’s SSMS, in the Object Explorer, right-click the Always On availabilitygroup and select Properties.The Availability Group Properties dialog box appears.

2. In the Availability Replicas table, in the Readable Secondary column, select either Yes orRead-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 secondaryreplica (for example, database file location, which can be different from the other replicas).

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

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

Note: If you are a domain administrator, you do not need to explicitly set these permissionsbecause 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 thatthese 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 selectProperties.

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 wantto 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:

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

1. On the Start menu, click Run, type secpol.msc, and press Enter on the keyboard.

Configuring Application Direct

54 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 55: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 tablesThe Microsoft application agent supports displaying TSQL operational output in table format andplain text format.

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

TSQL script for parsing output into multiple tables

USE [master]GO--insert into tabledeclare @t table (msg nvarchar(MAX))DECLARE @returnCode intinsert 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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END--parsing the msg for saveset entriesdeclare @output table( client nvarchar(100), SaveDate nvarchar(100), ssid nvarchar(25), saveset nvarchar(100))declare @tmpmsg nvarchar(max)declare @begin int, @end intdeclare @client nvarchar(100), @saveDate nvarchar(100), @ssid nvarchar(25), @saveset nvarchar(100)declare log_cursor CURSOR FOR select * from @topen log_cursorfetch next from log_cursor into @tmpmsgwhile @@FETCH_STATUS = 0BEGINif (PATINDEX('client = %', @tmpmsg) > 0)beginSET @begin = CHARINDEX('=', @tmpmsg, 1)SET @end = CHARINDEX(',', @tmpmsg, @begin)SET @client = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1)SET @begin = CHARINDEX('=', @tmpmsg, @end)

Configuring Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 55

Page 56: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

SET @end = CHARINDEX('(', @tmpmsg, @begin)SET @saveDate = SUBSTRING(@tmpmsg, @begin+1, @end-@begin-1)SET @begin = @endSET @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)endfetch next from log_cursor into @tmpmsgENDCLOSE log_cursordeallocate log_cursorselect * from @output

Configuring Application Direct

56 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 57: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 3

Configuring Storage Direct

This chapter includes the following sections:

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

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 57

Page 58: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Storage Direct backups

l Microsoft SQL Server Management Studio plugin, T-SQL and command prompt interfaces toperform backupsBackup maintenance operations, such as delete, is available in T-SQL and the commandprompt.

l Full backups, in which only changed blocks of the source devices are moved to Data Domain byusing 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 SQLServer 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 toperform 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 volumeare 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 ifthe restore is from a Data Domain copy

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

l Redirected restores, where the workflow mounts the backup from Data Domain directly andrestores 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 Microsoftapplication agent does not protectHowever, 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 Microsoftapplication agent, the database application agent, and the Storage Direct agent.

Configuring Storage Direct

58 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 59: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 ServerThe Microsoft application agent for Storage Direct with SQL Server supports the followingconfigurations:

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 RawDevice Mapping (RDM)

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

l Configurations, where all the volumes that are to be backed up are present on XtremIO, andconfigured on RecoverPoint for Storage Direct backupsDuring Storage Direct backups, all the volumes that are included in the backup must be capableof 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 thesame C:\.

n An user database is created on the SQL Server instance, where the data files are stored inE:\ 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 systemdatabases do not reside on a volume that is capable of creating RecoverPoint snapshots.You can back up only the customer’s database because both E:\ and F:\ support StorageDirect backups.

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

Configuring Storage Direct with RecoverPointThe PowerProtect Storage Direct Solutions Guide and the PowerProtect Storage Direct Primary andProtection Storage Configuration Guide provide information about how to configure primary andprotection storage for Storage Direct and vdisk.

NOTICE The Microsoft application agent uses a Data Domain Boost storage unit for catalogoperations 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 configureRecoverPoint.

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

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 59

Page 60: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

The Microsoft application agent uses the Storage Direct technology to enable snapshot backups ofMicrosoft applications’ data from primary storage on an XtremIO system to protection storage ona Data Domain system. This technology provides block movement of data from the XtremIOsystem 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 theData 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 aremoved 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 ServerManagement 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, andXtremIO 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 dependon each other, such as a database and a database log, are typically part of the same consistencygroup. 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 atarget of replication at a specific RPA cluster.

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

A RecoverPoint group set is a user-defined set of consistency groups. The RecoverPointdocumentation provides information about consistency groups and the procedures to set upconsistency 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 volumeexists for that local copy. The consistency group can have only one local copy on a DataDomain 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

Page 61: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Storage Direct with RecoverPoint topology

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

At the primary site, the application host accesses the database data that is stored on the XtremIOsystem, and the backup data is transferred to the Data Domain system. A separate recovery hostis optional. If the recovery is performed to the original application host, the application host is alsothe 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 atthe primary site to the Data Domain system at the secondary site. At the secondary site, you canalso recover the data to an optional recovery host.

Storage Direct with RecoverPoint connectivity requirementsStorage Direct with RecoverPoint operations require both IP network (LAN or WAN) and FibreChannel 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 XtremIOsystem

FC

Primary application host to RPA IP

Primary application host to primary DataDomain 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

Page 62: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Site Connected components Connection type

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

(Optional) Primary recovery host to primaryXtremIO system

FC

(Optional) Primary recovery host to primaryData 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 Domainsystem

FC and IP

Cross-siteconnections(optional)

Primary application host to Data Domainsystem

IP

Primary Data Domain system to secondaryData Domain system

IP

Storage Direct with RecoverPoint architectureThe 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 Directwith RecoverPoint architecture:

l Requestor (Application Agent VSS Requestor): Communicates with the VSS writer and theVSS 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

Page 63: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

l Hardware Provider (Application Agent VSS Hardware Provider): Creates shadow copies byusing Storage Direct technology. This component is implemented as a Windows COM service.This component enables creating a shadow copy, importing the shadow copy, and restoringthe 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 agentrequestor.

l Writer: A Microsoft application.

Create a Storage Direct with RecoverPoint configuration fileCreate 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=<client_or_hostname> Mandatory.

Specifies the application server hostname, to which youwant to back up or restore the databases. In the case ofcluster configurations, specify the name of the clusterinstance.

LOCKBOX_PATH=<full_path_to_lockbox> Optional.

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

DEBUG_LEVEL=<debug_level_1_through_9> Optional.

Specifies whether the software writes debug messagesto the debug log file. The default value is 0, in which nodebug messages are generated. The highest level is 9, inwhich 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=<DD_Boost_user> Mandatory.

Specifies the username of the DD Boost user.

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 63

Page 64: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 7 Primary system configuration file parameters (continued)

Parameter Description

You must register the hostname and the DD Boostusername in the lockbox to enable Microsoft applicationagent to retrieve the password for the registered user.

DEVICE_HOST=<Data_Domain_server> Mandatory.

Specifies the name of the Data Domain server thatcontains the storage unit, to which you want to back upand restore the databases with.

You must register the hostname and the DD Boostusername in the lockbox to enable Microsoft applicationagent to retrieve the password for the registered user.

DEVICE_PATH=<storage_unit_name> Mandatory.

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

DDVDISK_USER=<vdisk_username> Optional.

Specifies the Data Domain vdisk user. If you do notspecify this parameter, the value defaults to the userspecified with the DDBOOST_USER parameter.

DDBOOST_FC={TRUE | FALSE} Optional.

Specifies whether a backup or restore on the primaryData Domain system uses a Fibre Channel (FC) or IPnetwork 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 supportan FC connection.

DEVICE_FC_SERVICE=<fibre_channel_server> Mandatory when the DDBOOST_FC parameter is set toTRUE.

Specifies the name of the FC service configured on theprimary Data Domain system to be used for a backup orrestore.

RESTORE_DEVICE_POOL=<restore_device_pool> Mandatory.

Specifies the restore device pool that contains the vdiskdevices that you use to perform the restore operation.Ensure that the Data Domain server that you havespecified belongs to this device pool.

RESTORE_DEVICE_GROUP=<restore_device_group> Mandatory.

Configuring Storage Direct

64 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 65: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 7 Primary system configuration file parameters (continued)

Parameter Description

Specifies the restore device group that contains thevdisk devices and the restore device pool that you use toperform the restore operation. Ensure that the DataDomain server that you have specified belongs to thisdevice group.

RecoverPoint cluster

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

Table 8 RecoverPoint cluster configuration file parameters

Parameter Description

RP_MGMT_HOST=<RPA_management_hostname> Mandatory.

Specifies the fully qualified hostname of theRecoverPoint Management host.

You must register this hostname and the username in thelockbox so that the Microsoft application agent canretrieve the password for the user.

Type the hostname in the following format:

rp.my-host.com

RP_USER=<RPA_management_host_user> Mandatory.

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

You must register this username and the hostname in thelockbox so that the Microsoft application agent canretrieve 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_userDEVICE_HOST=ledmd035.lss.example.comDEVICE_PATH=/SU_DD163LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox"RP_MGMT_HOST=ledmd160.lss.example.comRP_USER=adminDDVDISK_USER=DD163_userCLIENT=mw2k8x64sql2.nmmdev.com

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 65

Page 66: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configuring Storage Direct with VMAXThe PowerProtect Storage Direct Solutions Guide and the PowerProtect Storage Direct Primary andProtection Storage Configuration Guide provide information about how to configure primary andprotection storage for Storage Direct and vdisk.

NOTICE The Microsoft application agent uses a Data Domain Boost storage unit for catalogoperations 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 overviewThe Microsoft application agent supports using Storage Direct with VMAX to protect Microsoftapplications.

The Microsoft application agent uses Storage Direct with VMAX to take snapshot backups ofapplication 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 onVMAX or that are not supported for snapshots due to vendor restrictions, are still protected usingApplication 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 DataDomain devices

SnapVX for snapshots

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

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

Storage Direct backups have minimal overhead on the application host because the protected datais 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

Page 67: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

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

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

At the primary site, the application host accesses the data that is stored on the VMAX array, andthe backup data is transferred to the Data Domain system. A separate recovery host is optional. Ifyou perform the restore operation to the original application host, then the application host is alsothe 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 primarysite to the Data Domain system that is at the secondary site. Also, you can restore thedata to the optional recovery host that is at the secondary site. However, you cannotperform 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 onmultiple VMAX storage arrays on the same site. The following figure shows an example of thistopology:

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 67

Page 68: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 VSShardware 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 Domainsystem.

Storage Direct with VMAX connectivity requirementsStorage 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 VMAXsystem

FC

Primary application host to primary DataDomain system

IP

Primary VMAX system to primary DataDomain system

FC

(Optional) Primary recovery host to primaryVMAX system

FC

Configuring Storage Direct

68 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 69: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Site Connected components Connection type

(Optional) Primary recovery host to primaryData Domain system

IP

Secondary site(optional)

Secondary recovery host to secondary VMAXsystem

FC

Secondary recovery host to secondary DataDomain system

IP

Secondary VMAX system to secondary DataDomain system

FC

Cross-siteconnections(optional)

Primary application host to secondary DataDomain system

IP

Primary Data Domain system to secondaryData Domain system

IP

Primary VMAX system to secondary VMAXsystem

SRDF/ S, SRDF/A, orSRDF/Metro

Secondary VMAX system to primary DataDomain system

FC, if distancepermits

Primary VMAX system to secondary DataDomain system

FC, if distancepermits

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

Figure 7 Storage Direct with VMAX architecture

VMAX replicationThe Microsoft application agent supports Storage Direct protection that uses a primary orsecondary 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

Page 70: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

secondary VMAX storage arrays are connected by a Symmetrix Remote Data Facility (SRDF) linkin 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 levelbetween the primary and secondary VMAX arrays. A source LUN referred to as R1 on the primaryarray is associated with a source LUN referred to as R2 on the secondary array. The SRDFsoftware maintains continuous synchronization of the two sources by copying all changes on oneLUN device to the other. The VMAX documentation provides more details about VMAX replicationand the SRDF functionality.

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

Note: The Microsoft application agent also uses the Application Direct workflow to back upany 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 andsecondary VMAX systems are attached to a Data Domain system. In this SRDF configuration, youcan use the Microsoft application agent to perform a Storage Direct backup to either the primaryor secondary Data Domain system. The primary Storage Direct backup backs up the R1 LUN to theprimary Data Domain system. The secondary Storage Direct backup backs up the R2 LUN to thesecondary Data Domain system.

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

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

Configuring Storage Direct

70 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 71: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 Microsoftapplication agent are as follows:

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

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

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

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

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

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

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

l The Microsoft application agent does not support concurrent SRDF or concurrentSRDF/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

Page 72: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Install and configure the VMAX Solutions EnablerBefore you begin

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

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

<Solutions_Enabler_Version>-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 1–1 mapping between source devices and backup devices, therefore, there isone 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 VMAXstorage group. The default name of the VMAX storage group is NSRSnapSG.

Note: Use restore (FTS) devices to perform rollback restores. Use vdisk devicesinstead 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 virtualmachine, on which you perform backups:

symcfg auth add -host <ESXi_Hostname> -username root -password <ESXi_Password> -namespace vmware/esxv2 -port 5988 -vmware

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

a. symcfg discoverb. sympd list

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

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

a. symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> -name<Snapshot_Name> establish

Configuring Storage Direct

72 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 73: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

b. symsnapvx -sid <Symmetrix_VMAX_ID> link -devs <STD_Device_ID> -lndevs <Backup_Device_ID> -name <Snapshot_Name> -copyFor 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 <Symmetrix_VMAX_ID> -devs <STD_Device_ID> 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 runningmust be up-to-date.

6. Configure gatekeepers as described in the PowerProtect Storage Direct Primary andProtection 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 DataDomain, 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 fileCreate 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=<client_or_hostname> Mandatory.

Specifies the application server hostname, to which youwant to back up or restore the databases. In the case ofcluster configurations, specify the name of the clusterinstance.

LOCKBOX_PATH=<full_path_to_lockbox> Optional.

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

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 73

Page 74: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 11 General configuration file parameters (continued)

Parameter Description

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

DEBUG_LEVEL=<debug_level_1_through_9> Optional.

Specifies whether the software writes debug messagesto the debug log file. The default value is 0, in which nodebug messages are generated. The highest level is 9, inwhich 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=<DD_Boost_user> Mandatory.

Specifies the username of the DD Boost user.

You must register the hostname and the DD Boostusername in the lockbox to enable Microsoft applicationagent to retrieve the password for the registered user.

DEVICE_HOST=<Data_Domain_server> Mandatory.

Specifies the name of the Data Domain server thatcontains the storage unit, to which you want to back upand restore the databases with.

You must register the hostname and the DD Boostusername in the lockbox to enable Microsoft applicationagent to retrieve the password for the registered user.

DEVICE_PATH=<storage_unit_name> Mandatory.

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

DDVDISK_USER=<vdisk_username> Optional.

Specifies the Data Domain vdisk user. If you do notspecify this parameter, the value defaults to the userspecified with the DDBOOST_USER parameter.

DDBOOST_FC={TRUE | FALSE} Optional.

Specifies whether a backup or restore on the primaryData Domain system uses a Fibre Channel (FC) or IPnetwork 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

Page 75: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 supportan FC connection.

DEVICE_FC_SERVICE=<fibre_channel_server> Mandatory when the DDBOOST_FC parameter is set toTRUE.

Specifies the name of the FC service configured on theprimary Data Domain system to be used for a backup orrestore.

RESTORE_DEVICE_POOL=<restore_device_pool> Mandatory.

Specifies the restore device pool that contains the vdiskdevices that you use to perform the restore operation.Ensure that the Data Domain server that you havespecified belongs to this device pool.

RESTORE_DEVICE_GROUP=<restore_device_group> Mandatory.

Specifies the restore device group that contains thevdisk devices and the restore device pool that you use toperform the restore operation. Ensure that the DataDomain server that you have specified belongs to thisdevice group.

RESTORE_FROM_DD_ONLY=yes Optional.

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

VMAX

The VMAX category is used to configure VMAX operations. The following table describes theparameters 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 theremote VMAX array when backing up SRDF/S protectedvolumes.

SNAPSG_NAME=<VMAX_storage_group_name> Optional.

Specifies the name of the VMAX storage group to useduring a restore to a FAST.X or VMAX native restoredevice on VMAX.

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 75

Page 76: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 13 VMAX configuration file parameters (continued)

Parameter Description

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

Example configuration file

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

DDBOOST_USER=DD163_userDEVICE_HOST=ledmd035.lss.example.comDEVICE_PATH=/SU_DD163LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox"RP_MGMT_HOST=ledmd160.lss.example.comRP_USER=adminDDVDISK_USER=DD163_userCLIENT=mw2k8x64sql2.nmmdev.com

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

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

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

Note: For a PowerProtect X400 system, the PowerProtect Data Manager creates a storageunit and automatically configures the lockbox on the application host. For each PowerProtectprotection policy, a source lockbox and replication target lockbox are created and configuredon the application host.

For a Data Domain system, you can configure one of the following lockbox types according to theenvironmental 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 locationand grant each remote host individual access to the lockbox.

Note: Do not use a single shared lockbox to perform remote backup operations in a clusterenvironment. 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 theenvironment.

Configuring Storage Direct

76 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 77: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Commands to create and manage the lockboxLockbox 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 PowerProtectData Manager automatically performs the lockbox configuration when the PowerProtectprotection 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 <lockbox_directory>] [--debug 9]

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

Register credentials to the lockbox

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

msagentadmin administration --registerLB --config <config_file_path> [--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 <config_file_path> [--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 <lockbox_directory>] [-a "LOCKBOX_REMOTE_HOST=<hostname_to_add>"] [-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 <lockbox_directory>] [-a "LOCKBOX_REMOTE_HOST=<hostname_to_delete>"] [--debug 9]

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 77

Page 78: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Reset the lockbox

To reset the lockbox, run the following command:

msagentadmin administration --updateLB [--lockbox <lockbox_directory>] [--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=<lockbox_directory>

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 '<lockbox>' in the directory '<lockbox_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=<lockbox_directory>

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 '<lockbox>' in the directory '<lockbox_directory>' has been reset.

Configuring Storage Direct

78 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 79: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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) thresholdfor the lockbox, run the following command:

msagentadmin administration --updateLB -a SET_LOCKBOX_SECURITY="custom" -a LOCKBOX_PATH=<lockbox_directory>

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

Import the lockbox

To import the lockbox, run the following command:

msagentadmin administration --updateLB -a LOCKBOX_IMPORT=yes -a LOCKBOX_PATH=<lockbox_directory>

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

Create a lockboxUse 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 isC:\Program Files\DPSAPPS\common\lockbox.

NOTICE When the Microsoft application agent is integrated with PowerProtect, thelockbox 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 aData Domain server, add the following credentials:

LOCKBOX_PATH=C:\LockboxesDDBOOST_USER=ddvdiskDEVICE_HOST=ledmd034.lss.emc.comDEVICE_PATH=/ddbdatest/mattp/pp

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 79

Page 80: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

msagentadmin administration --registerLB --config "<config_file_path>"

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 Onavailability groups

You must meet the following configuration requirements to perform backups and restores of SQLAlways 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 Onavailability group.

Configure a the lockbox

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

Provision restore devices

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

Parsing TSQL operational output into multiple tablesThe Microsoft application agent supports displaying TSQL operational output in table format andplain text format.

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

TSQL script for parsing output into multiple tables

USE [master]GO--insert into tabledeclare @t table (msg nvarchar(MAX))DECLARE @returnCode intinsert 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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Configuring Storage Direct

80 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 81: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

--parsing the msg for saveset entriesdeclare @output table( client nvarchar(100), SaveDate nvarchar(100), ssid nvarchar(25), saveset nvarchar(100))declare @tmpmsg nvarchar(max)declare @begin int, @end intdeclare @client nvarchar(100), @saveDate nvarchar(100), @ssid nvarchar(25), @saveset nvarchar(100)declare log_cursor CURSOR FOR select * from @topen log_cursorfetch next from log_cursor into @tmpmsgwhile @@FETCH_STATUS = 0BEGINif (PATINDEX('client = %', @tmpmsg) > 0)beginSET @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 = @endSET @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)endfetch next from log_cursor into @tmpmsgENDCLOSE log_cursordeallocate log_cursorselect * from @output

Configuring Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 81

Page 82: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configuring Storage Direct

82 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 83: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Page 84: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Backing Up SQL Server

84 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 85: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 4

Backing Up SQL Server with Application Direct

This chapter includes the following sections:

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

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 85

Page 86: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

The interface enables you to configure the module by using a SQL Server Management Studioplug-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 SQLdata.

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

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

l The Application Direct library API enables the backup software to communicate with the DataDomain 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 theApplication 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 theData Domain system, and sends only unique data for storage. The distributed segmentprocessing component enables the backup data to be deduplicated on the database orapplication host to reduce the amount of data transferred over the network. Distributedsegment processing on page 36 provides information.

When the Data Domain system restores data to a client, the system converts the stored data to itsoriginal non-deduplicated state before sending it over the network.

Federated backups of Always On availability groupsYou can use the SQL Server's Always On availability groups feature to place databases in anAvailability Group for high availability.

The database administrator can set backup preferences for the availability group and nominate aparticular copy, which can be either the primary copy or one of the secondary copies, to use forthe backup.

The Microsoft application agent supports federated backups for Application Direct backups.During federated backups, the Microsoft application agent detects the SQL Server's backuppreferences 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 thepreferred node is a secondary node, the Microsoft application agent performs a copy-onlybackup of databases. SQL Server does not support differential backups on secondary SQLServer 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

Page 87: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 10 Federated backup command and data flow

Best practices to back up SQL Server with Application DirectConsider 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 ofa 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 TransmissionControl Protocol (TCP)/Internet Protocol (IP), Fibre Channel (FC), and LAN, WAN, and MANnetwork types. Data Domain Boost and PowerProtect X400 devices can successfully operatewhere 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 tonon-English characters. However, database and path names must be written in ASCII charactersonly. Naming conventions for backups with Application Direct on page 88 provides moreinformation 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 itconsumes. The quota limits can only be set on the Data Domain system on a per-MTree (storageunit) basis.

An MTree's quota limits are calculated based on the logical size, which is the size beforecompression 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 aboutquota 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 andrestores. 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

Page 88: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

executed for each database. Databases are sequentially backed up and restored. When you usestripes, 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 aboutstreams limit, impact of exceeding the limits, and configuring the usage limits.

Naming conventions for backups with Application DirectWhen naming SQL Server instance, database, and filegroups, consider that the Microsoftapplication agent does not distinguish the difference between upper and lowercase letters. Thenames are not case-sensitive.

Therefore, if there are two or more databases with the same name but with differentcapitalization, such as DB1 and db1, the Microsoft application agent views these databases as thesame and by default backs up only one of the databases.

The following table described the special characters that are supported for naming databasebackups in SQL stand-alone, cluster, and Always On availability group configurations withApplication 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 Microsoftapplication agent does not. If an instance includes a hash symbol, backups of that instance willfail.

Backing Up SQL Server with Application Direct

88 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 89: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Circumstances that promote SQL Server backups to level fullTransaction 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 arepromoted to a full backup or the simple model databases are skipped, depending on the backupsettings.

Options to tune the behavior of automatic promotion are available while configuring a backup. Theddbmsqlsv -a "BACKUP_PROMOTION" command flag and the Microsoft app agent forApplication Direct SSMS plugin Backup Promotion option both control backup promotion.

Scheduling backup jobsYou can schedule Microsoft SQL Server backup jobs by using either the SQL Server Agent or theWindows Task Scheduler.

Scheduling SQL Server backups by using SQL Server AgentThe SQL Server Agent is a job-scheduling agent which is contained in the Microsoft SQL Serverpackage.

This section describes how to schedule SQL Server backups by using the SQL Server Agent job forthe CmdExec and T-SQL subsystems. The SQL Server Agent, a job-scheduling agent within theSQL 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 Microsoftapplication agent uses SQL Server to store job information and can run jobs on a schedule inresponse 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 logincredentials 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

Page 90: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Changing the SQL Server Agent service login credentialsProcedure

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 subsystemThe SQL Server Agent uses proxies, which are objects that enable the SQL Server Agent to accessstored 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 thecredentials that are defined in the proxy, and then uses the corresponding security context to runthe 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 selectProperties.

b. On the Credential Properties - EMC page, specify the following fields, and then clickOK:

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 thenclick 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

Page 91: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note: When you create a job step, you must select this proxy from the Run as liston the Job Step Properties page.

Scheduling a CmdExec jobYou can schedule a CmdExec job on either a single SQL Server or multiple SQL Servers.

Scheduling a CmdExec job on a single SQL ServerProcedure

1. Open SSMS, and then select View > Object Explorer.

2. In the Object Explorer, expand SQL Server Agent, right-click Jobs, and then select Newjob.

3. On the Job Properties window:

a. On the General page, type the appropriate information in the Name, Owner, andDescription 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 AgentService Account.

l Process execute exit code of a successful command: Type the process successexit code.

l Command: Specify the required command.Perform backups with the Microsoft app agent for Application Direct SSMS plug-inon page 97 provides information about how to generate the command.

The generated command does not have a full path to the binary. When you specifythe generated command in this field, you must add the full path to the binary. If thebinary 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 thecurrent 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 thecorresponding fields, and then click OK.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 91

Page 92: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

g. On the Alerts page, click Add to create an alert that will perform a job when a certainevent 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 thejob 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 notifyoperators about the status of the job step.

k. On the Notifications page, under Actions to perform when the job completes, select theappropriate 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 ServersScheduling jobs from one central location to multiple target SQL Servers eases the databaseadministrator’s job. To configure this setup, you must install the Microsoft application agent on alltarget hosts, make one SQL Server Agent a master, and make the rest of the hosts targets.

Configuring master and target SQL Server AgentsProcedure

1. Open the SSMS, and then select View > Object Explorer.

2. Right-click SQL Server Agent, and then select Multi Server Administrator > Make this aMaster.

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-mailaddress, Pager address, and Net send address fields to notify the operators about thestatus 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 targetsfor the SQL Server Agent jobs, and then click the right arrow to move them to theTarget 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 clickClose.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

Page 93: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 0according 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\<instance_name>\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 serversProcedure

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 Newjob.

3. On the Job Properties window:

a. On the General page, type the appropriate information in the Name, Owner, andDescription 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 AgentService Account.

l Process execute exit code of a successful command: Type the process successexit 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 specifythe generated command in this field, you must add the full path to the binary. Ifthe 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 thecurrent 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

Page 94: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 thecorresponding fields, and then click OK.

f. On the Alerts page, click Add to create an alert that will perform a job when a certainevent 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 thejob 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, tonotify operators about the status of the job step.

d. On the Notifications page, under Actions to perform when the job completes, selectthe appropriate notification methods to notify operators about the status of the jobstep.

e. On the Targets page, from the Target multiple servers list, select the target servers.

h. Click OK.

Scheduling a T-SQL jobT-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 Newjob.

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 NTSERVICE\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

Page 95: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 successexit code.

l Command: Specify the required T-SQL command.Perform backups with the Microsoft app agent for Application Direct SSMS plug-inon 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 tocheck whether the operation succeeds. If the command runs successfully, thescheduled backups will be successful.

If you want to use return codes in the generated T-SQL command, you must modifythe command.

Consider the following example raw T-SQL command:

USE [master]GODECLARE @returnCode intEXEC @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 @returnCodeGO

Consider the following example T-SQL command with return codes:

DECLARE @returnCode intEXEC @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 <>0BEGINRAISERROR ('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 jobstep 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 thecurrent 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 thecorresponding fields, and then click OK.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 95

Page 96: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l On the Alerts page, click Add to create an alert that will perform a job when a certainevent 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 thejob 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 notifyoperators about the status of the job step.

g. On the Notifications page, under Actions to perform when the job completes, selectthe 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 logfiles in the nsr/applogs/ folder.

Scheduling SQL Server backups by using Windows Task SchedulerTo 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 > TaskScheduler.

2. In the left pane of the Task Scheduler window, right-click Task Scheduler Library, andthen 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 thenclick Next.

4. On the Task Trigger page, select the appropriate option to start the task, and then clickNext.

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, typethe 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

Page 97: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Performing manual backupsThe Microsoft application agent for Application Direct with SQL Server supports multiple tools toperform manual backups.

You can configure backups using the Microsoft application agent SQL Server Management Studioplug-in (GUI), Microsoft application agent for Application Direct commands, or T-SQL scripts.

Perform backups with the Microsoft app agent for Application Direct SSMSplug-in

The Microsoft application agent supports a user interface to perform backup operations through aSQL 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-homedand has an interface on the backup LAN, the backups to the Data Domain device proceed over thebackup LAN by default.

If both the Data Domain device and the SQL host are multi-homed, and are connected to thebackup LAN, ensure that the Data Domain server name that you specify in the Microsoft app agentfor Application Direct SSMS plug-in is the same as the backup LAN IP address. The backups to theData Domain device proceed over the backup LAN.

To back up SQL Server to a Data Domain server over fibre channel (FC), you must first configureFC on the Data Domain server.

The Script view is available in each page of the Backup tab, which generates a command promptequivalent 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 settingsTo configure SQL backups with the Microsoft app agent for Application Direct SSMS plug-in, youmust first specify general backup options on the Backup > General page.

Procedure

1. Open the Microsoft app agent for Application Direct window to the Backup > Generalpage.

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

Page 98: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 containsthe 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 groupdatabases of the selected SQL Server instance in the database table, which is locatedbelow the Database Filter field.This option is selected by default.

You can back up the Always On availability group databases as regular databases withoutconsidering the Always On availability group preferences.

l Non AAG Databases: Displays only the regular databases of the selected SQL Serverinstance in the database table.

l A list of Always On availability groups if available: Selecting one of the Always Onavailability groups displays the corresponding databases in the database table.The Connections panel displays the name of the cluster that contains the Always Onavailability group and the backup preference that specifies the preferred replica toperform the backup. You can configure the replica preference of the Always Onavailability groups through the SSMS.

5. In the database table, select either all the databases by selecting the checkbox in the headerrow 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

Page 99: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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-levelpromotion and log truncation. Copy-only backups are supported for level full or transactionlog backups.

8. (Optional) To exclude databases from a SQL Server instance-level backup, perform thefollowing 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 databasesand 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 thefollowing format:

<save_set_name>:<database>For example, you select the databases db1 and db2, specify test as the backup or save setname, and then perform the backup. After the backup completes, the save set names of thebacked-up databases are test: db1 and test:db2.

Note: The number sign (#) character is not supported for save set names. If you usethis 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 mustexpire. The default value is 30.

12. Under Destination, to select the target Data Domain or PowerProtect X400 server for thebackup, perform the following steps:

a. Click the Data Domain Server browse button.

The Data Domain Connection List & Lockbox Settings dialog box appears, as shown inthe following figure.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 99

Page 100: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 PowerProtectX400 server for the backup.

d. (Optional) To add or remove Data Domain or PowerProtect X400 servers from theDataDomain 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 followingfigure.

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, themedium through which you want to back up the database to the server. Ethernetis selected by default.

Backing Up SQL Server with Application Direct

100 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 101: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

d. If you have selected Fibre channel from the Communication Protocol list, typethe name of the Data Domain server as the FC service name in the FC ServiceName 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 beforethey are saved in the lockbox. Verification of the user credentials requires sometime to complete.

l To remove a Data Domain or PowerProtect X400 server, select the server, and thenclick Remove.

l To add a SQL virtual server to either back up databases to SQL clustered instances orrestore 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 theSelect Host Name list, and then click Remove.

The PersistedSettings.xml file in the lockbox folder contains the information aboutData Domain or PowerProtect X400 servers. Adding a server to a new lockbox createsthe PersistedSettings.xml file. Adding a server to or removing a server from thelockbox updates the PersistedSettings.xml file.

13. To start the backup operation, click Run.

Configure optional backup settingsWhen 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

Page 102: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 14 Application Direct - Backup-Options page

2. To perform a checksum operation with the backup and save the information to the backupmedia, select Perform checksum before writing to media.

The Microsoft application agent performs another checksum before a restore to ensure thatthe 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 resultwith the stored value. If the values do not match and you encounter errors, you can selectthis 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 thebackup 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 alsospecify 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 tofull backup.

SIMPLE recovery model databases do not support transaction log backups. The Microsoftapplication agent enables this option if you select the SIMPLE recovery model databases toback 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

Page 103: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 modeldatabases to back up, and transaction log as the backup type. SIMPLE recovery modeldatabases do not support transaction log backups.

9. To check the status of the selected databases and ignore the databases that are unready orunavailable for the backup, select Skip databases that cannot be backed up at its currentstate.

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 areunready or unavailable for backups.

10. To generate detailed logs, which you can use to troubleshoot backup issues, specify anumber 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 afterfield, specify the number of days with a number between 1 and 32767 days. The defaultvalue is 0 and does not delete any debug logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo large.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

12. To specify backup promotion options, select one of the following values from the BackupPromotion 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 backuppromotion 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 backuppromotion in other scenarios will still occur.

l SKIP_RECOVERY_MODEL_WITH_WARNINGS: Enables database recovery modelchange detection, but if a recover model change is discovered, logs a warning instead ofpromoting the backup. Backup promotion in other scenarios will still occur.

13. To specify advanced backup options, use the Advanced options field to select or typeadvanced options.

Separate multiple entries with a comma, for example:BUFFERCOUNT=2, READ_WRITE_FILEGROUPSThe following advanced backup options are supported:

l BUFFERCOUNT=number_of_IO_buffers: Specifies the total number of IO buffers thatcan be used during the backup operation.

l READ_WRITE_FILEGROUPS: Backs up only the read/write (active) filegroups within thedatabase.

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

Page 104: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Monitor the backup operationAfter 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 filesthat are located in the installation folder. The typical location of the log files is C:\ProgramFiles\DPSAPPS\MSAPPAGENT\logs.

Back up SQL Server with the Application Direct backup commandUse the ddbmsqlsv command to configure backups of Microsoft SQL Server data from acommand prompt.

Note: In the syntaxes, the options that are enclosed in square brackets, that is, [ and ] areoptional.

To perform specific backup-related and restore-related operations, the Microsoft applicationagent 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

Page 105: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 <client_name> -l {full | incr | diff} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" [<optional_parameters>] "<backup_path>"

where:

-c <client_name>

Specifies the SQL Server hostname that contains the SQL Server instance that you want toback up.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), ordifferential (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=<server_name>"

Specifies whether the backup destination is a Data Domain or PowerProtect X400 server.

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

<backup_path>

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:]<database>

[[MSSQL:]<database> [...]]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$<Instance_Name>:n To back up specific databases, type MSSQL$<Instance_Name>:<database>

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

Page 106: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 <cluster_name> -A <virtual_server> -l {full | incr | diff} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" [<optional_parameters>] "<backup_path>"

Run the ddbmsqlsv command with the following syntax to back up a clusterless Always Onavailability group (AAG):

ddbmsqlsv -a "SKIP_CLIENT_RESOLUTION=TRUE" -c <AAG_name>_<AAG_GUID> -l {full | incr | diff} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" [<optional_parameters>] "<backup_path>"

Note: For a clusterless AAG, you must add the option -a"SKIP_CLIENT_RESOLUTION=TRUE" and specify <AAG_name>_<AAG_GUID> with the -coption.

where:

-c <cluster_name>

Specifies the Windows cluster name that you want to back up.

-c <AAG_name>_<AAG_GUID>

Specifies the clusterless AAG that you want to back up, for example, -c AAG1_ef770eaf-ebe3-f5be-bdff-3a7243ff1236.

-A <virtual_server>

Specifies the fully qualified domain name (FQDN) of the SQL virtual server.

Note: The -A option does not apply to clusterless AAG backups.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), ordifferential (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

Backing Up SQL Server with Application Direct

106 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 107: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-a "NSR_DFA_SI_DD_HOST=<server_name>"

Specifies the name of the Data Domain or PowerProtect X400 server that contains thestorage unit where you want to back up the databases.

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-a "SKIP_CLIENT_RESOLUTION=TRUE"

Specifies to skip the client resolution for <AAG_name>_<AAG_GUID>, as specified with the -c option. Skipping the client resolution is required for a clusterless AAG backup.

"<backup_path>"

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#<aag_name>:n To back up specific databases, type [MSSQL#<aag_name>:]<database>

[[MSSQL#<aag_name>:]<database> [...]]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$<Instance_Name>#<aag_name>:n To back up specific databases, type MSSQL

$<Instance_Name>#<aag_name>:<database> [...]For example: "MSSQL$SqlInst1#sql2012-aag3:database1" "MSSQL$SqlInst1#sql2012-aag3:database2"

Note: The Microsoft application agent does not support backing up multiple Always Onavailability 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 SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 107

Page 108: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Backing up an Always On availability group when all instance names are thesame

When the server nodes contain only default instances, or when the SQL Server instance names areall 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 databasesof the sql2012-aag3 Always On availability group are backed up. The backup object name ismade 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 $<SQL_Server_instance_name> in the backupobject.

n # indicates a federated backup.

n sql2012-aag3 is the AlwaysOn Availability Group name.

Backing up an Always On availability group when there are multiple instancenames

When you back up an Always On availability group where the nodes contain SQL Servers withdifferent instance names, the backup command on each instance should reflect the availableinstance.

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 thebackup 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 afterfailover.

Note: When browsing the backups for a restore operation, the save sets could be in either ofthe instances (SQL2INST4 or SQL2INST5). The save set depends on the instance that is usedfor the first backup.

Backing Up SQL Server with Application Direct

108 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 109: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Backing up multiple databases in an Always On availability group

To back up only certain databases in an Always On availability group, use "<save_set_name1>""<save_set_name2>" "<save_set_name3>"... to specify the database names as the backupobjects.

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 backupobjects

l Only database1, database3, and database8 of the sql2012-aag3 Always On availability group arebacked up.

Optional parameters for the ddbmsqlsv command

The following list describes the optional parameters that you can use with the ddbmsqlsvcommand:

-N <backup_set_name>

Specifies a name for the backup.

-b <backup_set_description>

Specifies a description for the backup.

-S <number_of_stripes>

Specifies to perform a striped backup using the number of stripes that you specify. If youspecify 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 ifyou select the SIMPLE recovery model databases for backup, and specify Transaction log asthe backup type. The SIMPLE recovery model databases do not support transaction logbackups.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 databasesthat 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 oravailable for backups.The default value is TRUE.

-q

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 109

Page 110: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Displays ddbmsqlsv messages in the quiet mode, that is, the option displays summaryinformation and error messages only.

-v

Displays ddbmsqlsv messages in the verbose mode, that is, the option provides detailedinformation 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 operationeven in the case of errors.

-y +<integer>{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

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 "<databases_to_omit>"

Specifies databases to omit from the backup. You can use this option to specify exactdatabase names or use wildcard characters.Two wildcard characters are supported:

l Question mark (?): Matches any single character

l Asterisk (*): Matches zero to unlimited charactersWhen you use wildcard characters you must enclose the database name in squarebrackets, 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 thebackup 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 backupcommand.

Backing Up SQL Server with Application Direct

110 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 111: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-O {BUFFERCOUNT | READ_WRITE_FILEGROUPS}

Specifies advanced backup options.You can specify the following advanced backup options:

l BUFFERCOUNT=<number_of_IO_buffers>: Specifies the total number of IO buffers thatcan be used during a backup operation.

l READ_WRITE_FILEGROUPS: Specifies to back up only the read/write (active) filegroupswithin the database.

If you are specifying multiple options, separate each argument with a comma. The syntax is asfollows:

-O "Option1, Option2, Option3"

-D <debug_level_1_through_9>

Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0(zero).

-a "DELETE_DEBUG_LOG_DAYS=<days>"

Specifies to delete debug log files that are older than the specified number of days. The validrange is between 1 and 32767. By default, debug logs are not deleted. Regularly deletingdebug 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 logsfolder at <installation_path>\MSAPPAGENT\logs.

-a "NSR_COPY_ONLY={TRUE | FALSE}"

Performs a copy-only backup from a SQL Server. The copy-only backups do not disturb theSQL Server backup chain and do not affect backup-level promotion and log truncation. Thedefault value is FALSE.This option applies only if you specify either full or incr as the backup type with the -lparameter.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 FibreChannel. The default value is FALSE.

-a "NSR_FC_HOSTNAME=<fibre_channel_server>

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 backupoperation.

-a "NSR_DFA_SI_DD_LOCKBOX_PATH=<full_path_to_lockbox>"

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith 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}"

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 111

Page 112: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 backuppromotion would normally occur.

l SKIP_RECOVERY_MODEL: Disables database recovery model change detection. Backuppromotion as a result of recovery model change will not occur, but backup promotion inother scenarios will still occur.

l SKIP_RECOVERY_MODEL_WITH_WARNINGS: Enables database recovery model changedetection, but if a recover model change is discovered, logs a warning instead ofpromoting 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 thissetting is specified along with an SQL instance level backup path.Similarly, the setting specified with this option applies only to specified databases when thissetting is specified with a database level backup path.

Perform backups with T-SQL scriptsThe Microsoft application agent for Application Direct enables you to generate a SQL-CLR scriptthat you can use to back up SQL Server.

The SQL-CLR backup command, emc_run_backup, uses the Microsoft application agent forApplication Direct with SQL Server backup command prompt options. You must also provideVARCHAR parameters to this command.

To use this command, you must have a detailed knowledge of the Microsoft application agent forApplication Direct with SQL Server backup command prompt options. Back up SQL Server withthe Application Direct backup command on page 104 provides information about the Microsoftapplication 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]GODECLARE @returnCode int8 -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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

You can use any SQL Server standard interfaces, such as the SSMS Query window and OSQLcommand 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.

Backing Up SQL Server with Application Direct

112 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 113: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Best practices to back up SQL Server with Application Direct on page 87 provides guidelines forbetter performance of SQL Server backups by using the Microsoft application agent forApplication Direct SQL-CLR scripts.

Performing SQL Server push backups by using the Microsoft application agent for ApplicationDirect T-SQL scripts

About this task

To back up either all databases or only the specific databases of a SQL Server instance from asource host to a Data Domain or PowerProtect X400 device by using a different host, perform thefollowing 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 thesource host and copy it to the New Query window on the different host or write the T-SQL scriptin the New Query window. Perform backups with the Microsoft app agent for Application DirectSSMS plug-in on page 97 and Perform backups with T-SQL scripts on page 112 provideinformation.

Example 4 T-SQL push backup script

USE [master]GODECLARE @returnCode intEXEC @returnCode = dbo.emc_run_backup ' -c CLUST-SQL-02.contoso.com -ACLUST-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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

where:

l CLUST-SQL-02.contoso.com is the source host that has the source SQL Serverinstance that you want to back up.

l Inst1 is the source SQL Server instance, to which you must connect from thedifferent host to perform the backup.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 113

Page 114: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 4 T-SQL push backup script (continued)

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 toback up.

Performing federated backups of SQL Always On availability group databases by using T-SQLscripts

To perform federated backups, use the same backup command and options that Perform backupswith T-SQL scripts on page 112 describes, but with the following modifications:

l Specify the Windows cluster name for <client_name> in -c <client_name>.

l Specify the backup object name for <save_set_name> in -N <save_set_name>.

l Specify #<AlwaysOn_Availability_Group_name> 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 Onavailability groups in the same operation.

Example 5 Sample T-SQL script to back up an entire Always On availability group

USE [master]GODECLARE @returnCode intEXEC @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:\ProgramFiles\DPSAPPS\common\lockbox" -a"NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" -N "MSSQL$SQ12INST4#sql2012-aag3:" "MSSQL$SQ12INST4#sql2012-aag3:"'IF @returnCode <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Example 6 Sample T-SQL script to back up multiple databases (a subset of databases) of an Always Onavailability group

USE [master]GODECLARE @returnCode intEXEC @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:\ProgramFiles\DPSAPPS\common\lockbox" -a

Backing Up SQL Server with Application Direct

114 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 115: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 6 Sample T-SQL script to back up multiple databases (a subset of databases) of an Always Onavailability group (continued)

"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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Example 7 Sample T-SQL script to back up a specific database of an Always On availability group

USE [master]GODECLARE @returnCode intEXEC @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:\ProgramFiles\DPSAPPS\common\lockbox" -a"NSR_SKIP_NON_BACKUPABLE_STATE_DB=TRUE" -N "MSSQL$SQ12INST4#sql2012-aag3:database1" "MSSQL$SQ12INST4#sql2012-aag3:database1"'IF @returnCode <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Listing backupsList the backups performed to a Data Domain or PowerProtect X400 system by using either themsagentadmin administration command or the ddbmexptool command.

List backups and save files with the msagentadmin administration commandThe Microsoft application agent supports list commands to view backups and save files.

List backups or save files using the msagentadmin administration command with thefollowing syntax:

msagentadmin administration {--list | --listfiles} --ddhost "<server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" --appID "mssql" [<optional_parameters>]

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.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 115

Page 116: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l --list specifies to list backups.You can use the -s alias for the list parameter.

--ddhost "<server_name>"

Specifies the name of the server that contains the storage unit, to which you backed up thedatabases.

--ddpath "/<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_user>"

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 msagentadminadministration commands.

--config "<configuration_file_path>"

Specifies the full path to the configuration file.You can use the -z alias for the --config parameter.

--lockbox <lockbox_path>

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use.If you do not specify a value, the path defaults to the installation path, which is typicallyC:\Program Files\DPSAPPS\common\lockbox.

--tier

Specifies to display the location of the save sets in either the Data Domain system (activetier) or the Data Domain Cloud Tier.

--client <client_name>

Specifies the application server hostname that contains the server instance that was backedup.You can use the -c alias for the --client parameter.

--before <end_time>

Lists only the backups that were taken on or before the given date and time, date, day, ortime. 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 <start_time>

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 <integer>

Specifies to limit the list results to the specified number.

Backing Up SQL Server with Application Direct

116 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 117: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

--debug <level_1_through_9>

Specifies the debug level for listing backups. The default value is 0 (zero).You can use the -D alias for the --debug parameter.

--deleteDebugLog <days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767.By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folderon the installation drive from becoming too large.This parameter only deletes debug logs named in the default format and located in the logsfolder at <installation_path>\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 "<key-value_pair>"

Specifies the keyword and value of an option that is also specified in the configuration file. Forexample, -a "CLIENT=<client_name>".

Examples of the msagentadmin list commandConsider 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:

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 117

Page 118: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 10 Limit the list results to a certain number (continued)

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

List backups with the Application Direct expiry toolAbout this task

Run the following command to list backups:

ddbmexptool -l -n MSSQL -a "DDBOOST_USER=<DD_Boost_user>" -a "DEVICE_PATH=<storage_unit>" -a "DEVICE_HOST=<name>" -a "CLIENT=<client_name>" [<optional_parameters>]

where:

-l

Specifies to list backups.

-n MSSQL

Specifies to list SQL Server application save sets.

-a "DEVICE_HOST=<name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

-a "DEVICE_PATH=<storage_unit>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

a "DDBOOST_USER=<DD_Boost_user>"

Specifies the username of the DD Boost user.

Backing Up SQL Server with Application Direct

118 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 119: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-a "CLIENT=<client_name>"

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. Tolist save sets in descending order, showing the most recent save sets first, specifyLIST_SAVESET_DESC=TRUE in the configuration file, then use the -a“LIST_SAVESET_DESC=TRUE” option with the ddbmexptool command.

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 <debug_level_1_through_9>

Generates detailed logs that you can use to troubleshoot the backup issues. The default valueis 0 (zero).

-p <number_of_days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents the log folder on the installation drive from becoming too large. This parameter onlydeletes debug logs named in the default format and located in the logs folder at<installation_path>\MSAPPAGENT\logs.

-b <start_time>

Specifies the lower boundary of the save time of the backup.Specify the time in either the <Hr> :<Min>:<Sec> <Month> <DD>, <YYYY> format orthe relative time format. The supported relative time formats are now, <n> days ago, <n>months ago, <n> years ago, and <n> days.

If you do not specify the -b option, the command considers 1/1/1970 as the lower boundary.

-e <end_time>

Specifies the upper boundary of the save time of the backup.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 119

Page 120: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Specify the time in either the <Hr> :<Min>:<Sec> <Month> <DD>, <YYYY> format orthe relative time format. The supported relative time formats are now, <n> days ago, <n>months ago, <n> years ago, and <n> days.

If you do not specify the-e option, the command considers the current time as the upperboundary.

The best practice is to set the value of -e to the same value as the expiration policy timeperiod that was specified at the backup time.

-N <save_set_name>

Specifies a particular save set name to either display or display and delete. For example, -NMARS$DEST2008:testdb1.

-z <full_path_to_the_configuration_file>

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 theconfiguration file. For example, -a "DEVICE_HOST = bu-ddb890.lss.emc.com"

-Y

Specifies to skip the user confirmation prompt when deleting backups.

Move and recall save sets on a Data Domain Cloud TierThe 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 34describes 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 aData Domain Cloud Tier, the Microsoft application agent automatically recalls the save setsto the active tier on Data Domain.However, when you use Elastic Cloud Storage (ECS) with DD OS 6.1 or later, the Microsoftapplication agent restores the save sets on the cloud tier device directly from ECS to theclient without recalling to the active tier. The Data Domain documentation provides moredetails and recommendations for restore operations directly from ECS.

n Manual: When both of the following conditions exist, recall the save sets manually beforeyou perform a restore operation:

– When a restore operation needs the save sets that are present on a Data Domain CloudTier.

– When you do not want the Microsoft application agent to automatically recall andrestore the save sets.

Backing Up SQL Server with Application Direct

120 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 121: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Move save sets to the Data Domain Cloud TierUse the --move or -m flag with the msagentadmin administration command to move savesets 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 previouslymarked save sets by using the --after <start_time> and --before <end_time> options. Ifyou mark the previously marked save sets, it can impact the performance of the datamovement.

Consider the following example commands to mark SQL Server save sets to move them from aData Domain storage unit to a Data Domain Cloud Tier:

Example 13 Cloud tier move command without a configuration file

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 TierUse the --recall or -r flag with the msagentadmin administration command to recallsave sets from a Data Domain Cloud Tier.

To recall save sets from the Data Domain Cloud Tier device to the Data Domain storage unit, typethe 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 aData Domain storage unit to a Data Domain Cloud Tier:

Example 15 Cloud tier recall command without a configuration file

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 121

Page 122: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 commandThe following list describes the optional parameters you can use with msagentadminadministration commands.

--config "<configuration_file_path>"

Specifies the full path to the configuration file.You can use the -z alias for the --config parameter.

--lockbox <lockbox_path>

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use.If you do not specify a value, the path defaults to the installation path, which is typicallyC:\Program Files\DPSAPPS\common\lockbox.

--tier

Specifies to display the location of the save sets in either the Data Domain system (activetier) or the Data Domain Cloud Tier.

--client <client_name>

Specifies the application server hostname that contains the server instance that was backedup.You can use the -c alias for the --client parameter.

--before <end_time>

Lists only the backups that were taken on or before the given date and time, date, day, ortime. 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 <start_time>

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 <integer>

Specifies to limit the list results to the specified number.

Backing Up SQL Server with Application Direct

122 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 123: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

--debug <level_1_through_9>

Specifies the debug level for listing backups. The default value is 0 (zero).You can use the -D alias for the --debug parameter.

--deleteDebugLog <days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767.By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folderon the installation drive from becoming too large.This parameter only deletes debug logs named in the default format and located in the logsfolder at <installation_path>\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 "<key-value_pair>"

Specifies the keyword and value of an option that is also specified in the configuration file. Forexample, -a "CLIENT=<client_name>".

Deleting backupsDelete backups using either the msagentadmin administration command or theddbmexptool command.

Delete backups with the msagentadmin administration commandThe Microsoft application agent supports the msagentadmin administration command todelete 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 throughthe PowerProtect Data Manager protection policy schedule, the expired backup copies aredeleted according to the schedule. These backup copies must not be deleted through themsagentadmin administration command.

If you try to use the command to delete the backup copies that are managed by PowerProtectData Manager, an error message appears.

To delete save sets or backups, run the msagentadmin administration command with thefollowing syntax:

msagentadmin administration --delete --ddhost "<name>" --ddpath "/<storage_unit_name_and_path>" --dduser "<DD_Boost_user>" --appID "mssql" <optional_parameters>

where:

--delete

Specifies a delete operation.

--ddhost "<name>"

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 123

Page 124: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

--ddpath "/<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_user>"

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 msagentadminadministration commands.

--config "<configuration_file_path>"

Specifies the full path to the configuration file.You can use the -z alias for the --config parameter.

--lockbox <lockbox_path>

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use.If you do not specify a value, the path defaults to the installation path, which is typicallyC:\Program Files\DPSAPPS\common\lockbox.

--tier

Specifies to display the location of the save sets in either the Data Domain system (activetier) or the Data Domain Cloud Tier.

--client <client_name>

Specifies the application server hostname that contains the server instance that was backedup.You can use the -c alias for the --client parameter.

--before <end_time>

Lists only the backups that were taken on or before the given date and time, date, day, ortime. 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 <start_time>

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 <integer>

Specifies to limit the list results to the specified number.

--debug <level_1_through_9>

Specifies the debug level for listing backups. The default value is 0 (zero).You can use the -D alias for the --debug parameter.

Backing Up SQL Server with Application Direct

124 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 125: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

--deleteDebugLog <days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767.By default, debug logs are not deleted. Regularly deleting debug logs prevents the log folderon the installation drive from becoming too large.This parameter only deletes debug logs named in the default format and located in the logsfolder at <installation_path>\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 "<key-value_pair>"

Specifies the keyword and value of an option that is also specified in the configuration file. Forexample, -a "CLIENT=<client_name>".

Example of the msagentadmin delete commandConsider 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 toolThe 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 usingthe 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 hasdependent non-expired backups.

Note: You must not delete an expired backup if it has dependent non-expired backups. Theexpiry tool does not check for the dependent backups.

l You have created a configuration file.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 125

Page 126: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

DEVICE_PATH=/artitestDDBOOST_USER=ostDEVICE_HOST=10.31.192.10CLIENT=mw2k8x64sql2.nmmdev.comDEBUG_LEVEL=0LOCKBOX_PATH="C:\Program Files\DPSAPPS\common\lockbox"

Note: For the DEVICE_HOST variable, specify either the same hostname or the same IPaddress that you specified in the DataDomain Server field when you added or configuredthe 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 throughthe PowerProtect Data Manager protection policy schedule, the expired backup copies aredeleted according to the schedule. These backup copies must not be deleted through theApplication Direct expiry tool.

If you try to use the Application Direct expiry tool to delete the backup copies that aremanaged 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 specificsave time range and regardless of the expiry date, run the following command:

ddbmexptool -d -n MSSQL -a "DDBOOST_USER=<DD_Boost_user>" -a "DEVICE_PATH=<storage_unit>" -a "DEVICE_HOST=<server_name>" -a "CLIENT=<client_name>" [<optional_parameters>]

where:

-d

Specifies to delete backups.

-n MSSQL

Specifies to delete SQL Server application save sets.

-a "DEVICE_HOST=<server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

-a "DEVICE_PATH=<storage_unit>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

a "DDBOOST_USER=<DD_Boost_user>"

Specifies the username of the DD Boost user.

-a "CLIENT=<client_name>"

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.

Backing Up SQL Server with Application Direct

126 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 127: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 interactivemode.

l When you use the non-interactive mode (-Y option), set the value of the -e option to aminimum 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

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=<DD_Boost_user>" -a "DEVICE_PATH=<storage_unit>" -a "DEVICE_HOST=<server_name>" -a "CLIENT=<client_name>" [<optional_parameters>]

where:

-k

Specifies to delete expired backups.

-n MSSQL

Specifies to delete SQL Server application save sets.

-a "DEVICE_HOST=<server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

-a "DEVICE_PATH=<storage_unit>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

a "DDBOOST_USER=<DD_Boost_user>"

Specifies the username of the DD Boost user.

-a "CLIENT=<client_name>"

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 expiredbackups. However, the command does not delete the metadata files that the Microsoft

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 127

Page 128: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

application agent creates during backups. The size of the metadata files is negligible, and doesnot 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

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_deletestored procedure, which enables you to run the expiry tool from a regular SQL ServerManagement Studio GUI.

The stored procedure runs the expiry tool, and uses the command line arguments that are passedinto the stored procedure.

The stored procedure also ensures that the delete command includes -Y and the -n mssqloptions.

The expiry tool requires the -Y and the -n mssql options because you cannot intervene, and theMicrosoft application agent supports only the MSSQL plug-in through the T-SQL interface.

Sample T-SQL command to view the backups

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Sample T-SQL command to delete the backups

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGIN

Backing Up SQL Server with Application Direct

128 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 129: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

RAISERROR ('Fail!', 16, 1)END

Sample T-SQL command to delete the expired backups

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('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.

-D <debug_level_1_through_9>

Generates detailed logs that you can use to troubleshoot the backup issues. The default valueis 0 (zero).

-p <number_of_days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents the log folder on the installation drive from becoming too large. This parameter onlydeletes debug logs named in the default format and located in the logs folder at<installation_path>\MSAPPAGENT\logs.

-b <start_time>

Specifies the lower boundary of the save time of the backup.Specify the time in either the <Hr> :<Min>:<Sec> <Month> <DD>, <YYYY> format orthe relative time format. The supported relative time formats are now, <n> days ago, <n>months ago, <n> years ago, and <n> days.

If you do not specify the -b option, the command considers 1/1/1970 as the lower boundary.

-e <end_time>

Specifies the upper boundary of the save time of the backup.Specify the time in either the <Hr> :<Min>:<Sec> <Month> <DD>, <YYYY> format orthe relative time format. The supported relative time formats are now, <n> days ago, <n>months ago, <n> years ago, and <n> days.

If you do not specify the-e option, the command considers the current time as the upperboundary.

The best practice is to set the value of -e to the same value as the expiration policy timeperiod that was specified at the backup time.

-N <save_set_name>

Specifies a particular save set name to either display or display and delete. For example, -NMARS$DEST2008:testdb1.

Backing Up SQL Server with Application Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 129

Page 130: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-z <full_path_to_the_configuration_file>

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 theconfiguration 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

130 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 131: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 5

Backing Up SQL Server with Storage Direct

This chapter includes the following sections:

l Overview of SQL Server backups with Storage Direct......................................................... 132l Storage Direct backup workflow.......................................................................................... 132l Best practices to back up SQL Server with Storage Direct.................................................. 133l RecoverPoint on XtremeIO backup considerations.............................................................. 134l Naming conventions for backups with Storage Direct..........................................................135l Backing up SQL Server with Storage Direct.........................................................................136l List backups with the msagentadmin command................................................................... 148l Deleting backups.................................................................................................................. 151

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 131

Page 132: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Overview of SQL Server backups with Storage DirectYou 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) fornon-Gen0 backups. Storage Direct modifies the blocks that are deleted on the volumes, andconsiders 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 allthe 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 databasesthat 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 workflowThe backup workflow for Storage Direct is different depending on whether you are using a VMAXarray or RecoverPoint appliance.

Storage Direct with RecoverPoint backup workflowThe Storage Directwith RecoverPoint backup workflow includes the following steps:

1. The database administrator starts a Storage Direct with RecoverPoint backup by running thedatabase 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 checkswhether 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 bequiesced or placed in the hot backup mode.

4. The Microsoft application agent notifies RecoverPoint to create a point-in-time snapshot, thatis a bookmark of the consistency groups that contain the source LUNs.

5. RecoverPoint creates a snapshot of all the required consistency groups on the XtremIOsystem.

6. The Microsoft application agent notifies the application or database that the files can beunquiesced or taken out of the backup mode, for a minimum impact on the application or thedatabase.

7. RecoverPoint uses Application Direct to write all the blocks that are changed since theprevious snapshot, to working files on the Data Domain system.

8. RecoverPoint uses the FastCopy service to create and store a Data Domain vdisk static imagefrom 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 predefinedApplication 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

Page 133: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

11. The Microsoft application agent uses the Application Direct workflow to back up the files thatStorage Direct cannot protect, to the Data Domain system, which provides full data protection.

Storage Direct with VMAX backup workflowThe 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, andspecifying 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 bequiesced 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 beunquiesced or taken out of the backup mode, for a minimum impact on the application or thedatabase.

6. The VMAX array copies the changed data on each source LUN to a corresponding Data Domainvdisk device, which is a VMAX FAST.X encapsulated LUN.

7. For each Data Domain vdisk device, the Data Domain system creates a Data Domain vdiskstatic 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 predefinedApplication Direct storage unit on the Data Domain system.

10. The Microsoft application agent uses the Application Direct workflow to back up the files thatStorage Direct cannot protect, to the Data Domain system, which provides full data protection.

Best practices to back up SQL Server with Storage DirectThe following are the best practices to back up SQL Server by using the Microsoft applicationagent 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 dateand time display language can be set to non-English characters. However, database and pathnames must be written in ASCII characters only. Naming conventions for backups with StorageDirect on page 135 provides more information on supported characters for database and instancenames.

Stop VSS when you stop VSS Storage Direct Hardware Provider

When you manually stop or restart VSS Storage Direct Hardware Provider, you must stop orrestart 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 onlycrash-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

Page 134: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

does not know about the excluded volumes for the backup because there is no special safetycheck.

The XtremIO and VMAX LUNs must contain data for only one type of application server. Forexample, if you are using a LUN to back up SQL Server data, the same LUN cannot be used toprotect Exchange Server data. If the LUNs contain data from more than one type of applicationserver, 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 notsupport the feature.

Configure Data Domain quota limits

The Microsoft application agent does not have a parameter to control the total size that itconsumes. The quota limits can only be set on the Data Domain system on a per-MTree (storageunit) basis.

An MTree's quota limits are calculated based on the logical size, which is the size beforecompression 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 aboutquota 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 andrestores. 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 concurrentlyexecuted for each database. Databases are sequentially backed up and restored. When you usestripes, 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 aboutstreams limit, impact of exceeding the limits, and configuring the usage limits.

RecoverPoint on XtremeIO backup considerationsIf 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 includingthem in the backup.

Otherwise, if you use a RecoverPoint version that is earlier than 5.0, any rollback restores of thebackup 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 notrecorded in the Microsoft application agent catalog.

Note: Performing a rollback restore of this backup can corrupt the databases that are notincluded 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

Page 135: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Microsoft VSS requires a snapshot to be taken within 10 seconds. If the number of consistencygroups increases, the snapshot time increases.

Naming conventions for backups with Storage DirectWhen naming SQL Server instance, database, and filegroups, consider that the Microsoftapplication agent does not distinguish the difference between upper and lowercase letters. Thenames are not case-sensitive.

Therefore, if there are two or more databases with the same name but with differentcapitalization, such as DB1 and db1, the Microsoft application agent views these databases as thesame and by default backs up only one of the databases.

The following table described the special characters that are supported for naming databasebackups in SQL stand-alone, cluster, and Always On availability group configurations withMicrosoft 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 Microsoftapplication agent does not. If an instance includes a hash symbol, backups of that instance willfail.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 135

Page 136: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Backing up SQL Server with Storage DirectThe Microsoft application agent for Storage Direct with SQL Server supports multiple tools toperform backups.

You can configure backups using the Microsoft application agent SQL Server Management Studioplug-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 SSMSplug-in

The Microsoft application agent supports a user interface to perform backup operations through aSQL 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 othertasks.

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-SQLscripts 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 StorageDirect.

Note: If the Microsoft App Agent (Storage Direct) button is not on the toolbar, the plug-inmay be unable to register. In this scenario, you can launch the plug-in directly from the Startmenu. From the Windows Start menu, select DDBMA Plugin for SQL Server ManagementStudio.

Configure general backup settingsTo configure SQL backups with the Microsoft app agent for Storage Direct SSMS plug-in, youmust 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

Page 137: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 16 Storage Direct - Backup-General page

2. In the SQL Server Instance field, select the name of the SQL Server instance that containsthe databases that you want to back up.

Note: The Microsoft app agent for Storage Direct SSMS plug-in does not supportbacking up multiple SQL Server instances in the same operation. To back up multipleSQL 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, allthe databases by selecting the check box in the header row or only the required databasesto back up.

Note: A RecoverPoint Consistency Groups column appears when you specify theRecoverPoint 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 asFull or Transaction log.

To perform hybrid backups, select Transaction log. A full backup must exist for transactionlog 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

Page 138: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configure backup optionsWhen 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 thefollowing action sequence:

a. Click . . . beside Data Domain.

The Data Domain Connection List & Lockbox Settings dialog box appears as shown inthe following figure.

Backing Up SQL Server with Storage Direct

138 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 139: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 Connectionstable, 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 thefollowing figure.

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 139

Page 140: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 19 Storage Direct - Add Data Domain Server details

b. DataDomain Server: Specify the name of the Data Domain server, to which youwant 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. Bydefault, Ethernet is selected.

d. FC Service Name: Specify the name of the Data Domain server as the fibrechannel (FC) service name if you have selected Fibre Channel from theCommunication 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 toback up the databases.

h. To add a different vdisk user than the DD Boost user, perform the following actionsequence:

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

Page 141: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 orrestore 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 restoredatabases from SQL clustered instances by using the T-SQL integration, youmust 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 theSelect Host Name list, and then click Remove.

The PersistedSettings.xml file in the lockbox folder contains the information aboutData Domain servers. Adding a Data Domain server for the first time to a new lockboxcreates the PersistedSettings.xml file. Adding or removing a Data Domain serverto or from the lockbox updates the PersistedSettings.xml file.

3. To select a RecoverPoint appliance that you want to use to perform the backup, performthe following action sequence:

a. Click . . . beside Management Server.

The RecoverPoint Connection List & Lockbox Settings dialog box appears as shown inthe 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

Page 142: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

c. In the RecoverPoint Connections table, select the target RecoverPoint appliance orvRPA for the backup.

d. (Optional) To add or remove a RecoverPoint appliance from the RecoverPointConnections 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 thefollowing figure.

Figure 22 Storage Direct - Add RecoverPoint Server details

b. In the RecoverPoint Management Host field, type the name of the RecoverPointmanagement 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 orrestore 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 restoredatabases from SQL clustered instances by using the T-SQL integration, youmust 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 virtualserver 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 performbackups.

4. To use the remote VMAX array when you are backing up SRDF/S protected volumes, selectPerform 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 anumber 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

Page 143: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

6. To delete debug logs older than a certain number of days, in the Delete debug logs afterfield, specify the number of days with a number between 1 and 32767 days. The defaultvalue is 0 and does not delete any debug logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo large.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\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 AvailabilityGroup.

You can perform Always On availability group backups from either a primary node or asecondary node.

Selecting this option does not back up local databases. You can backup the local databasesby 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 operationAfter a backup operation is run from the Microsoft app agent for Storage Direct SSMS plug-in, theBackup > 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

Page 144: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 23 Storage Direct - Backup-Monitor page

Note: For information about the success or failure of the backup operation, review the log filesthat are located in the installation folder at<Microsoft_application_agent_install_path>\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 commandTo back up SQL Server databases, use the following command:

msagentsv.exe [<options>] <path>

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 withRecoverPoint backup operations:

msagentsv.exe -c <client_or_hostname> -l {full | incr | diff} -A "NSR_DFA_SI_DD_HOST=<Data_Domain_server>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A

Backing Up SQL Server with Storage Direct

144 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 145: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

"RP_MGMT_HOST=<RecoverPoint_management_host>" -A "RP_USER=<RecoverPoint_user>" [<optional_parameters>] <path>

where:

-c <client_name>

Specifies the SQL Server hostname that contains the SQL Server instance that you want toback up.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), ordifferential (diff). The default value is full.

-a "NSR_DFA_SI_DD_HOST=<server_name>"

Specifies whether the backup destination is a Data Domain server.

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "RP_MGMT_HOST=<RecoverPoint_management_host>"

Specifies the fully qualified hostname of the RecoverPoint Management host. You mustregister this hostname and the username in the lockbox so that the Microsoft applicationagent can retrieve the password for the user. For example, rp.my-host.com.

-A "RP_USER=<RecoverPoint_user>"

Specifies the RecoverPoint username that the hardware provider uses while taking the LUNlevel snapshots. You must register this username and the hostname in the lockbox so that theMicrosoft application agent can retrieve the password for this user. Forexample,recoverpoint-user.

<backup_path>

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\<backup_client_name>

n To back up specific databases, type APPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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\<URL-encoded_SQL_instance_name>

n To back up specific databases, type APPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 145

Page 146: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 VMAXbackup operations:

msagentsv.exe -c <client_or_hostname> -l {full | incr | diff} -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" [<optional_parameters>] <path>

where:

-c <client_name>

Specifies the SQL Server hostname that contains the SQL Server instance that you want toback up.

-l {full | incr | diff}

Specifies the type of the backup to perform such as full (full), transaction log (incr), ordifferential (diff). The default value is full.

-a "NSR_DFA_SI_DD_HOST=<server_name>"

Specifies whether the backup destination is a Data Domain server.

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit where you want to direct the backup.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

<backup_path>

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\<backup_client_name>

n To back up specific databases, type APPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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\<URL-encoded_SQL_instance_name>

n To back up specific databases, type APPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

Backing Up SQL Server with Storage Direct

146 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 147: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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=<full_path_to_lockbox>"

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith 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 <debug_level_1_through_9>

Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0(zero).

-A "DELETE_DEBUG_LOG_DAYS=<days>"

Specifies to delete debug log files that are older than the specified number of days. The validrange is between 1 and 32767. By default, debug logs are not deleted. Regularly deletingdebug 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 logsfolder at <installation_path>\MSAPPAGENT\logs.

-A "DDVDISK_USER=<vdisk_username>"

Specifies the Data Domain vdisk user. Full credentials are retrieved from the lockbox toauthenticate with the host.

-A "SYMM_SNAP_REMOTE=yes"

Specifies that the Storage Direct backup will use the remote VMAX array when backing upSRDF/S protected volumes.Do not use this option if you use a RecoverPoint appliance to perform backups.

Back up SQL Server with T-SQL scriptsThe Microsoft application agent for Storage Direct enables you to generate SQL-CLR script thatyou 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. Theprotectpoint_run_backup command uses the same command options as the msagentsv.execommand. Optional parameters for the msagentsv.exe command on page 147 provides informationabout the backup command prompt options for backing up SQL Server.

You can use any SQL Server standard interfaces such as, the SQL Server Management StudioQuery window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL backup script

USE [master]GODECLARE @returnCode intEXEC @returnCode = dbo.protectpoint_run_backup ' -cLCP1018.MSAppAgent.com -A

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 147

Page 148: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

"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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

List backups with the msagentadmin commandList backups and files with the msagentadmin command.

To list backups, run the following command:

msagentadmin list --ddhost "<server_name>" --ddpath "/<storage_unit_name_and_path>" --dduser "<DD_Boost_user>" --rphost "<RecoverPoint_hostname>" --rppath "<RecoverPoint_host_path>" --rpuser "<RecoverPoint_host_user>" [--config <file name>] [<optional_parameters>]

where:

list

Specifies an operation to list backups.You can use the -s alias for the list parameter.

--ddhost "<server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

--ddpath "/<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_user>"

Specifies the username of the DD Boost user.

--rphost "<RecoverPoint_hostname>"

Specifies the fully qualified hostname of the RecoverPoint Management host. You mustregister this hostname and the username in the lockbox so that the Microsoft applicationagent can retrieve the password for the user.Mandatory only for backups with a RecoverPoint appliance.For example: rp.my-host.com

--rppath "<RecoverPoint_host_path>"

Specifies the full path to the RecoverPoint management host.Mandatory only for backups with a RecoverPoint appliance.For example: rp.my-host.com

--rpuser "<RecoverPoint_host_user>"

Specifies the RecoverPoint username that the hardware provider uses while taking the LUNlevel snapshots. You must register this username and the hostname in the lockbox so that theMicrosoft 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

Page 149: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

--config "<configuration_file_path>"

(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 StorageDirect, the msagentadmin administration list command is also supported with StorageDirect. List backups and save files with the msagentadmin administration command on page115 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 commandThe following list describes the optional parameters for the msagentadmin list command.

--client <client_name>

Specifies the application server hostname that contains the server instance that was backedup.You can use the -c alias for the --client parameter.

--lockbox <lockbox_path>

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 149

Page 150: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use.If you do not specify a value, the path defaults to the installation path, which is typicallyC:\Program Files\DPSAPPS\common\lockbox.

--after <start_time>

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 <end_time>

Lists only the backups that were taken on or before the given date and time, date, day, ortime. 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 <number_of_days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents 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 logsfolder at <installation_path>\MSAPPAGENT\logs.

--debug <level_1_through_9>

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 restorecommand, msagentrc.keyvalue: Lists the output in the keyword and value format that you can use in otherprograms.

Backing Up SQL Server with Storage Direct

150 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 151: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Deleting backupsYou can delete backups using the msagentadmin delete command or using T-SQL scripts.

Delete backups with the msagentadmin commandThe msagentadmin delete command first lists the backups, and then deletes the backups.

To delete backups, run the following command:

msagentadmin delete --ddhost "<server_name>" --ddpath "/<storage_unit_name_and_path>" --dduser "<DD_Boost_user>" --rphost "<name>" --rppath "<RecoverPoint_host_path>" --rpuser "<user>" [--config <file name>] [<optional_parameters>]

where:

delete

Specifies an operation to delete backups.You can use the -d alias for the delete parameter.

--ddhost "<server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

--ddpath "/<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_user>"

Specifies the username of the DD Boost user.

--rphost "<RecoverPoint_hostname>"

Specifies the fully qualified hostname of the RecoverPoint Management host. You mustregister this hostname and the username in the lockbox so that the Microsoft applicationagent can retrieve the password for the user.Mandatory only for backups with a RecoverPoint appliance.For example: rp.my-host.com

--rppath "<RecoverPoint_host_path>"

Specifies the full path to the RecoverPoint management host.Mandatory only for backups with a RecoverPoint appliance.For example: rp.my-host.com

--rpuser "<RecoverPoint_host_user>"

Specifies the RecoverPoint username that the hardware provider uses while taking the LUNlevel snapshots. You must register this username and the hostname in the lockbox so that theMicrosoft application agent can retrieve the password for this user.Mandatory only for backups with a RecoverPoint appliance.For example: recoverpoint-user

--config "<configuration_file_path>"

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

Page 152: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note: While it is recommended that you use the msagentadmin command with StorageDirect, the msagentadmin admnistration list commands are also supported with StorageDirect. List backups and save files with the msagentadmin administration command on page115 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 <client_name>

Specifies the application server hostname that contains the server instance that was backedup.You can use the -c alias for the --client parameter.

--lockbox <lockbox_path>

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use.If you do not specify a value, the path defaults to the installation path, which is typicallyC:\Program Files\DPSAPPS\common\lockbox.

--after <start_time>

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

Page 153: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

You can use the -b alias for the --after parameter.

--before <end_time>

Lists only the backups that were taken on or before the given date and time, date, day, ortime. 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 <number_of_days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents 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 logsfolder at <installation_path>\MSAPPAGENT\logs.

--debug <level_1_through_9>

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 restorecommand, msagentrc.keyvalue: Lists the output in the keyword and value format that you can use in otherprograms.

Delete backups using T-SQL scriptsThe Microsoft application agent for Storage Direct enables you to generate SQL-CLR script thatyou 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 StudioQuery window and T-SQL command prompt to run the SQL-CLR scripts.

Example 25 Sample T-SQL backup deletion script

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGIN

Backing Up SQL Server with Storage Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 153

Page 154: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

Page 155: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 VM Direct"

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 155

Page 156: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Restoring SQL Server

156 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 157: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 6

Restoring Application Direct Backups

This chapter includes the following sections:

l Best practices to restore SQL Server with Application Direct..............................................158l Restoring SQL Server databases ........................................................................................ 158l Performing table-level recovery........................................................................................... 179l Performing SQL Server disaster recovery............................................................................185

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 157

Page 158: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Best practices to restore SQL Server with Application DirectConsider the best practices to restore SQL Server using Application Direct.

Configure connection settings

Data Domain Boost and PowerProtect X400 devices do not distinguish among TransmissionControl Protocol (TCP)/Internet Protocol (IP), Fibre Channel (FC), and LAN, WAN, and MANnetwork types. Data Domain Boost and PowerProtect X400 devices can successfully operatewhere 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'sinitialization procedure writes zeros to the portion of the disk that contains the data and the logfiles. Enabling the instant file initialization feature does not enable zeroing of the disk for the datafiles.

Configure usage limits for Data Domain streams

Configure a sufficient number of Data Domain streams for better performance of backups andrestores. 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 concurrentlyexecuted for each database. Databases are sequentially backed up and restored. When you usestripes, 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 aboutstreams limit, impact of exceeding the limits, and configuring the usage limits.

Restoring SQL Server databasesThe Microsoft application agent for Application Direct with SQL Server supports multiple tools torecover databases.

You can recover databases using the Microsoft application agent SQL Server Management Studioplug-in (GUI), Microsoft application agent for Application Direct commands, or T-SQL scripts.

PrerequisitesLearn about prerequisites for database restores.

Prerequisites for restoring a database to a remote serverLearn 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 ServerManagement Studio (SSMS) plug-in only.

The Microsoft application agent and Application Direct SSMS plug-in must be installed on the SQLServer where you will configure the restore operation. Using the SSMS plug-in, you can browseSQL backups from any server on the Data Domain or PowerProtect X400 storage unit and set thetarget 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

Page 159: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 instancewhere you configure the restore operation.For example, if the instance where you are running the restore has a lockbox with DataDomain1and StorageUnit1, you must create the same lockbox with DataDomain1 and StorageUnit1 onthe 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 therestore operation, the Microsoft application agent starts the SQL Server Agent automaticallyduring the restore operation. If the remote server is on a different domain, then you mustlaunch 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 inthe 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 restoreoperation, 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-inThe Microsoft application agent supports a user interface to perform restore operations through aSQL Server Management Studio (SSMS) plug-in.

About this task

The Microsoft application agent caches SQL Server restore settings. The Microsoft applicationagent automatically loads the information from the last recovery operation and populates restoresettings. Caching saves time by eliminating the need to reselect the settings each time you run arestore operation. To clear the cached settings, click Clear Cache.

The Script option is available in each page of the Database Restore tab, which generates acommand prompt equivalent script. You can use the script to create a .bat file to performautomation 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 thecommand prompt.

l T-SQL Scripts: To generate a restore script in the T-SQL format.

Launching the Microsoft app agent for Application Direct SSMS plug-in

To launch the Microsoft app agent for Application Direct SSMS plug-in, perform the followingsteps:

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, specifythe server information and credentials, and then click Connect.

3. On the toolbar, click Microsoft App Agent (Application Direct).

Note: If the Microsoft App Agent (Application Direct) 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

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 159

Page 160: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Start menu. From the Windows Start menu, select DDBMA Plugin for SQL ServerManagement Studio.

Configure general restore settingsTo configure SQL restores with the Microsoft app agent for Application Direct SSMS plug-in, youmust 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 recoveryoperation and populates all of the fields under Sources. To clear the cached settings, clickClear Cache.

2. In the Data Domain Server field, select the Data Domain or PowerProtect X400 server thatcontains the backup.

Note: When you want to restore a replicated backup from a secondary Data Domain orPowerProtect X400 server, select the secondary server. The Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 servermust 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.

Restoring Application Direct Backups

160 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 161: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

4. From the SQL Server Instance list, select the SQL Server instance that contains thedatabases that you want to restore.

The databases located on the SQL Server instance appear in the database table below theSQL Server Instance field.

5. From the database table, select either the entire SQL Server instance by selecting thecheck 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 savesets table below the Browse time field.

By default, the restore process selects the most recent backup timestamp for each selecteddatabase. 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 followingsteps:

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 savesets table.

b. From the save sets table, select the save set with the timestamp that you want torestore.

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.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 161

Page 162: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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.

If you are restoring the database to an instance on a remote SQL Server that is notlisted, 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 theSQL 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 toconnect to the SQL Server:

n Select Windows Authentication when you are restoring to a host in the samedomain.

n Select SQL Server Authentication when you are restoring to a host in adifferent 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 SQLAgent, type the login credentials in the User Name and Password fields. Youmust type the username in the format of Domain Name\User Name.Specify the proxy user credentials if the SQL Agent service user does not havesufficient permissions to perform a restore operation or if you want to performrestore as a different user.

If the SQL Agent Service on the target server uses a Windows Domain accountand 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 populatedwith the default destination path.

9. To start the restore operation, click Run.

Configure files and filegroup restore settingsWhen 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 aremote 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

Page 163: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 26 Application Direct - Database Restore-Files page

2. Under Filegroup Options, to display the corresponding database files of the databases thatyou have selected on the General page, from the Select Filegroup to restore list, selectone 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 thePRIMARY filegroup only.

l Custom filegroup name: Displays the database files of the selected databases thatbelong to the selected custom filegroup name only. In the figure, the custom filegroupnames are sec and third.

3. Under Relocation Options, to change the destination restore paths, perform one of thefollowing action sequences:

l To change the destination paths of all of the data and log files, perform the followingsteps:

a. Select Relocate all files to folder.

b. Click the Data file folder browse button to specify a location for the data files, orclick 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 clickinside the field to type the folder path.

l To change the destination path for each individual data or log file, perform one of thefollowing actions in the files table:

n To browse for a destination path, click the browse button to the right of each data orlog 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

Page 164: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

n To type a new destination path, in the Restore As column, click the appropriate celland type a destination path. If the path does not exist, a dialog box appears asking ifyou want to create the folder.

Note: The settings under Relocation Options are disabled if you have selected theRestore backups as files option on the General page.

4. To start the restore operation, click Run.

Configure optional database restore settingsWhen you configure SQL database restores with the Microsoft app agent for Application DirectSSMS 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 existingdatabase (WITH REPLACE). The database is overwritten only if the database name isunchanged.

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

Page 165: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 rollingback uncommitted transactions, and disable the ability to restore the most recent oradditional transaction logs.

l RESTORE WITH NORECOVERY: To leave the database in the non-operational state bynot rolling back uncommitted transactions, and enable the ability to restore the mostrecent or additional transaction logs.

l RESTORE WITH STANDBY: To enable the ability to undo committed transactions, savethe undo actions in a standby file that enables you to reverse the restore effects, and putthe database in the read-only mode. If you select this option, specify the Standby filefield 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 requirementswithout 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 Performchecksum before writing to media option

l Whether the destination host has sufficient space to restore dataNote:

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 tothe 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 anumber 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 afterfield, specify the number of days with a number between 1 and 32767 days. The defaultvalue is 0 and does not delete any debug logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo large.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

8. To restore all the backups that were performed during or after a specified start time and upuntil 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 timefor restore field. The start date and time must be before the backup time of the save setthat is being restored.

9. To specify advanced recovery options, use the Advanced options field to select or typeadvanced 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

Page 166: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

The following advanced recovery options are supported:

l BUFFERCOUNT=buffer_number: Specifies the total number of IO buffers that can beused during recovery.

l KEEP_CDC: Enables change data capture (CDC) recovery.When restoring a database with CDC enabled, the recover operation works differentlydepending on the recovery destination.

Use the KEEP_CDC option to:

n Recover the CDC enabled database on the same SQL instance by overwriting anexisting 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 cacheretrieves, 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 Taketail-log backup before restore.

A tail-log backup ensures that the Microsoft application agent backs up the data that haschanged since the previous backup.

Note:

l The Microsoft application agent for Application Direct does not support tail-logbackups of multiple databases.

l This option is disabled if the Restore backups as files or Verify only options areselected.

12. To ensure exclusive access to the database during the restore operation if multipleconnections exist, select Close existing connections to destination database.

13. To start the restore operation, click Run.

Monitor the restore operationAfter a database restore operation is run from the Microsoft app agent for Application DirectSSMS 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

Page 167: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 28 Application Direct - Database Restore-Monitor page

Note: For information about the success or failure of the restore operation, review the log filesthat are located in the installation folder. The typical location of the log files is C:\ProgramFiles\DPSAPPS\MSAPPAGENT\logs.

Perform database restores with the Microsoft application agent for ApplicationDirect recover command

Use the ddbmsqlrc command to configure a restore of Microsoft SQL Server databases from acommand prompt.

Note: In the syntaxes, the options that are enclosed in square brackets, that is, [ and ] areoptional.

To perform specific backup-related and restore-related operations, the Microsoft applicationagent 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 <client_name> -S {normal | norecover | standby:<filepath>\undo.ldf} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" [<optional_parameters>] "<restore_path>"

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 167

Page 168: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

where:

-c <client_name>

Specifies the SQL Server hostname, to which you want to restore the required databases. ASQL Server host contains the backed-up stand-alone or clustered SQL Server instances andthe corresponding databases.

-S {normal | norecover | standby:<filepath>\undo.ldf}

Performs one of the following tasks:

l normal: Enables you to roll back uncommitted transactions and use the database torestore the most recent or additional transaction logs.

l norecover: Disables your ability to roll back uncommitted transactions and use thedatabase to restore the most recent or additional transaction logs.

l standby:<filepath>\undo.ldf: Enables you to undo committed transactions, saves theundo actions in a standby file that enables you to reverse the restore effects, and puts thedatabase 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=<server_name>"

Specifies the name of the Data Domain or PowerProtect X400 server that contains thebackup.When you have a remote (secondary) Data Domain or PowerProtect X400 server that hasreplicated databases to restore, type the name of the secondary server. A Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server mustbe in the same group as the primary server.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit that contains the backup.

"<restore_path>"

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:]<database>

[[MSSQL:]<database> [...]]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$<Instance_Name>:n To restore backups of specific databases, type MSSQL

$<Instance_Name>:<database> [...]For example: "MSSQL$SqlInst1:database1" "MSSQL$SqlInst1:database2"

Restoring Application Direct Backups

168 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 169: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 <cluster_name> -A <virtual_server> -S {normal | norecover | standby:<filepath>\undo.ldf} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" [<optional_parameters>] "<restore_path>"

Run the following command to restore databases in a clusterless Always On availability group(AAG) environment:

ddbmsqlrc.exe -a "SKIP_CLIENT_RESOLUTION=TRUE" -c <AAG_name>_<AAG_GUID> -S {normal | norecover | standby:<filepath>\undo.ldf} -a "NSR_DFA_SI=TRUE" -a "NSR_DFA_SI_USE_DD=TRUE" -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" [<optional_parameters>] "<restore_path>"

Note: For a clusterless AAG, you must add the option -a"SKIP_CLIENT_RESOLUTION=TRUE" and specify <AAG_name>_<AAG_GUID> with the -coption.

where:

-c <client_name>

Specifies the Windows cluster name for the restore.To perform a redirected restore, specify a SQL Server host that is not the current host.

-c <AAG_name>_<AAG_GUID>

Specifies the clusterless AAG for the restore, for example, -c AAG1_ef770eaf-ebe3-f5be-bdff-3a7243ff1236.

-A <virtual_server>

Specifies the SQL virtual server FQDN to restore the databases from the SQL clusteredinstance.

Note: The -A option does not apply to clusterless AAG restores.

-S {normal | norecover | standby:<filepath>\undo.ldf}

Performs one of the following tasks:

l normal: Enables you to roll back uncommitted transactions and use the database torestore the most recent or additional transaction logs.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 169

Page 170: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l norecover: Disables your ability to roll back uncommitted transactions and use thedatabase to restore the most recent or additional transaction logs.

l standby:<filepath>\undo.ldf: Enables you to undo committed transactions, saves theundo actions in a standby file that enables you to reverse the restore effects, and puts thedatabase 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=<server_name>"

Specifies the name of the Data Domain or or PowerProtect X400 server that contains thebackup.When you have a remote (secondary) Data Domain or PowerProtect X400 server that hasreplicated databases to restore, type the name of the secondary server. A Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server mustbe in the same group as the primary server.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit that contains the backup.

-a "SKIP_CLIENT_RESOLUTION=TRUE"

Specifies to skip the client resolution for <AAG_name>_<AAG_GUID>, as specified with the -c option. Skipping the client resolution is required for a clusterless AAG restore.

"<restore_path>"

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#<aag_name>:n To restore backups of specific databases, type [MSSQL#<aag_name>:]<database>

[[MSSQL#<aag_name>:]<database> [...]]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$<Instance_Name>#<aag_name>:

n To restore backups of specific databases, type MSSQL$<Instance_Name>#<aag_name>:<database> [...]

For example: "MSSQL$SqlInst1#sql2012-aag3:database1" "MSSQL$SqlInst1#sql2012-aag3:database2"

Example 27 SQL Always On availability group restore command

Restoring Application Direct Backups

170 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 171: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 27 SQL Always On availability group restore command (continued)

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"

Example 28 SQL clusterless Always On availability group restore command

ddbmsqlrc.exe -a "SKIP_CLIENT_RESOLUTION=TRUE" -c clusterlessa_6f27c29c-5d83-0062-8301-357210660ac6 -S normal -a "NSR_DFA_SI_DD_HOST=10.31.140.154" -a "NSR_DFA_SI_DD_USER=ost" -a "NSR_DFA_SI_DEVICE_PATH=/aru" -a "NSR_DFA_SI_DD_LOCKBOX_PATH=C:\Program Files\DPSAPPS\common\lockbox" -C "'ClusterlessADB01'='H:\MSSQL14.MSSQLSERVER\MSSQL\DATA\ClusterlessADB01.mdf', 'ClusterlessADB01_log'='H:\MSSQL14.MSSQLSERVER\MSSQL\DATA\ClusterlessADB01_log.ldf'" -f -d MSSQL:ClusterlessADB01 MSSQL:ClusterlessADB01

Optional parameters for the ddbmsqlrc command

You can use the following optional parameters with the ddbmsqlrc command.

-a "NSR_DFA_SI_DD_LOCKBOX_PATH=<full_path_to_lockbox>"

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use. If you do not specify a value, the path defaults to theinstallation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

-t "<backup_time_stamp>"

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 defaultvalue is FALSE.

-a "NSR_FC_HOSTNAME=<Data_Domain_Fibre_Channel_server_name>"

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 andmultiple transaction log and differential backups to files.To know the order in which multiple transaction log backup files are restored, use the savetimes that are present in the filenames.

The default value is FALSE.

-a "FLAT_FILE_RECOVERY_DIR=<folder_path>"

Specifies the folder, in which the flat file restore files are generated.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 171

Page 172: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

You can see the generated files in the <flat_file_recovery_folder>\<client_name>\<sql_instance_name> location.

-a "DDBOOST_COMPRESSED_RESTORE={TRUE | FALSE}"

Compresses the restore contents and transports them from the Data Domain Replicator tothe application host. This option saves network bandwidth.The default value is FALSE.

-a "RESTORE_START_TIME=<start_date_and_time>"

Restores all the backups that were performed at or after a specified backup time (start dateand time) and up to the backup time of the selected save set, that is, -t<Last_Backup_Time_Stamp>.Specify the start date and time in the <mm>/<dd>/<yyyy> <hr>:<mins>:<secs> {AM | PM}format.

The start date and time must not be after the backup time of the selected save set, that is, -t<Last_Backup_Time_Stamp>.

-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 optionsare used.

-a "CLOSE_SQL_CONNECTIONS={TRUE | FALSE}”

Specifies whether to enable exclusive access to the target database by changing the databaseto single user mode during the restore operation to ensure a successful recovery.

-$ <instance>

Specifies the target SQL Server instance that contains the target databases that you want torestore. 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 MSSQLl For a named instance, type MSSQL$<instance_name>

-d <destination_database>

Specifies the target database, to which you want to restore the backup.Type the value in one of the following formats:

l <destination_database_name>

l MSSQL:<destination_database_name>

l MSSQL$<instance_name>:<destination_database_name>

-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 " '<source_path>';'<destination_path>'"

Relocates file paths and all files contained in a path to a different location during a restoreoperation.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:

Restoring Application Direct Backups

172 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 173: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l Normal restore—Same server and same instance.

l Different instance restore—Same 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 option and the -H option in the same operation.

-f

Overwrites the existing database with the current database that you restore if the names ofboth the databases are same.

-q

Displays ddbmsqlsv messages in the quiet mode, that is, the option displays summaryinformation 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 theoperation even in the case of errors.

-D <debug_level_1_through_9>

Generates detailed logs that you can use to troubleshoot backup issues. The default value is 0(zero).

-a "DELETE_DEBUG_LOG_DAYS=<days>"

Specifies to delete debug log files that are older than the specified number of days. The validrange is between 1 and 32767. By default, debug logs are not deleted. Regularly deletingdebug 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 logsfolder at <installation_path>\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.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:

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 173

Page 174: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 "<option1>, <option2>, ..."

Specifies advanced recovery options. Separate each option with a comma.The following table describes the advanced recovery options that are available:

l BUFFERCOUNT=<number>: Specifies the total number of IO buffers that can be usedduring 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 thebackup. This option can only be used to recover backups performed with theREAD_WRITE_FILEGROUPS option. You cannot specify filegroup or file level recovertargets with the READ_WRITE_FILEGROUPS option.If you are relocating multiple filegroups during the restore, you can use the -H option forglobal relocation.

After you restore a backup with the READ_WRITE_FILEGROUPS option, any read-onlyfilegroups in the database will enter the recovery pending state and the rest of thefilegroups will go online.

There are two different scenarios to recover cumulative incrementalREAD_WRITE_FILEGROUPS backups:

n If you have taken a full READ_WRITE_FILEGROUPS backup prior to the cumulativeincremental backup, the Microsoft application agent will chain together the twobackups in the correct order and complete the restore.

n If you have not taken a full READ_WRITE_FILEGROUPS backup but want to use anormal full backup as the differential base for the cumulative incrementalREAD_WRITE_FILEGROUPS backup, you must first restore the full backup normallyand leave the database in no recovery mode, and then apply theREAD_WRITE_FILEGROUPS differential backup with the -z option.

-z

Enables implementation of a recovery plan in independent command line operations. Normallythe Microsoft application agent builds the recovery plan, ensuring that all the requiredbackups 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 thefollowing backup history:

Restoring Application Direct Backups

174 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 175: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l savetime 1:00 - full backup

l savetime 2:00 - txnlog backup

l savetime 3:00 - txnlog backup

To recover multiple backups and restore a database in a single command, run the followingcommand:

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,run the following commands:

ddbmsqlrc ... -z -S norecover -t "savetime 1:00" ...

ddbmsqlrc ... -z -S norecover -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. Thiscommand is required for all backups except for level full backups.

Use the -S norecover 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 commandrecovers 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 savetime. For instance, in the previous example, you can replace 3:00 with 2:45. The databaseis 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.

Starting with Microsoft application agent 19.2, you can specify the ddmsqlrc commandoption -S norecover when you restore a read-write (active) filegroup, which leaves thedatabase in the recovering mode. In this mode, you can then apply subsequent transactionlogs to complete a point-in-time restore of the active filegroup, for example, when backupsare configured as in the following example. The following example commands use thefollowing backup history:

l savetime 6/21/2019 12:10:35 PM - full read/write filegroup backup with -O"READ_WRITE_FILEGROUPS" option

l savetime 6/21/2019 12:21:30 PM - txnlog backup

l savetime 6/21/2019 12:25:34 PM - txnlog backup

To perform a point-in-time restore of the active filegroup, run the following commands:

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 175

Page 176: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

1. Restore the filegroup backup in norecover mode:

ddbmsqlrc ... -z -f -t "06/21/2019 12:10:35 PM" -S norecover -O "READ_WRITE_FILEGROUPS" ...

2. Restore the second last log backup in norecover mode:

ddbmsqlrc ... -z -f -t "06/21/2019 12:21:30 PM" -S norecover ...

3. Complete the point-in-time restore in normal mode to a time before the final log backup:

ddbmsqlrc ... -z -f -t "06/21/2019 12:25:34 PM" -S normal ...

Perform database restores with T-SQL scriptsThe Microsoft application agent for Application Direct enables you to generate a SQL-CLR scriptthat you can use to restore SQL Server databases.

The SQL-CLR restore command, emc_run_restore uses the Microsoft application agent forApplication Direct with SQL Server restore CLI options. You must also provide VARCHARparameters to this command. To use this command, you must have a detailed knowledge of theMicrosoft application agent for Application Direct with SQL Server restore CLI options. Performdatabase restores with the Microsoft application agent for Application Direct recover command onpage 167 provides information about the Microsoft application agent for Application Direct withSQL Server restore CLI options.

Sample T-SQL restore script

The following SQL-CLR script is an example of a restore script:

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

You can use any SQL Server standard interfaces, such as the SSMS Query window and OSQLcommand prompt tool, to run the SQL-CLR scripts.

Best practices to back up SQL Server with Application Direct on page 87 provides guidelines forbetter performance of SQL Server restores by using the Microsoft application agent forApplication Direct SQL-CLR scripts.

Restoring Application Direct Backups

176 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 177: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Performing SQL Server push restores by using the Microsoft application agent for ApplicationDirect T-SQL scripts

About this task

To restore either all databases or only the specific databases of a SQL Server instance from a DataDomain or PowerProtect X400 device to a destination host by using a different host, perform thefollowing steps.

Note: When the data to be restored exists in a Data Domain Cloud Tier, perform a recalloperation prior to the push restore operation.

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-inGUI on the destination host and copy it to the New Query window on the different host or writethe T-SQL script in the New Query window. Restore a database with the Microsoft app agent forApplication Direct plug-in on page 159 and Perform database restores with T-SQL scripts on page176 provide information.

Example 29 T-SQL push restore script

Consider the following example T-SQL push restore script:

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

where:

l clust-sql-01.contoso.com is the source host from which the backup wasperformed.

l Inst1 is the destination SQL Server instance, to which you must connect from thedifferent host to perform the restore.

l CLUST-SQL-02-DB02 is the destination database.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 177

Page 178: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 29 T-SQL push restore script (continued)

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 176 describes, but for <client_name> in -c<client_name>, specify the Windows cluster name.

The options in the following example scripts indicate the modification.

Example 30 Sample T-SQL script to restore a federated backup to the source database

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Example 31 Sample T-SQL script to restore a federated backup to a different instance and database(redirected restore)

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Example 32 Sample T-SQL script to restore multiple databases of a federated backup

Restoring Application Direct Backups

178 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 179: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 32 Sample T-SQL script to restore multiple databases of a federated backup (continued)

Note: When you restore multiple databases, do not use the -C and -d options withthe T-SQL restore command. If you do, the restore fails.

USE [master]GODECLARE @returnCode intEXEC @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 <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Performing table-level recoveryThe Microsoft application agent supports table-level recovery of SQL Server data using theMicrosoft app agent for Application Direct SSMS plug-in.

The Microsoft application agent does not support the Script option to perform table restoresusing a command prompt or T-SQL scripts.

Table-level restore workflowBefore you beginWhen you install the Microsoft application agent, you must install ItemPoint to perform table-levelrestores. Otherwise, the Table Restore tab does not appear in the Microsoft app agent forApplication Direct SSMS plug-in.

About this taskTo perform table-level restores, you must first mount the backup images and specify mountoptions by using the Microsoft app agent for Application Direct SSMS plug-in. Once the backup ismounted, 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 isrecently committed to the databases, a table restore may not be appropriate.

Committed data is represented as outstanding transactions when there are SQL Server full andincremental backups on the database. When you perform table-level recovery, ItemPoint must loadall 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 VirtualFile System performance. This problem occurs while ItemPoint loads the database and ItemPointmay appear to stop responding while reading the backup. If you observe this problem, analternative to using SQL table-level recovery is to restore the backup as flat files to a server whereyou have enough space, and then use ItemPoint to restore the files on the local disk.

Launching the Microsoft app agent for Application Direct SSMS plug-inTo launch the Microsoft app agent for Application Direct SSMS plug-in, perform the followingsteps:

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 179

Page 180: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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, specifythe server information and credentials, and then click Connect.

3. On the toolbar, click Microsoft App Agent (Application Direct).

Note: If the Microsoft App Agent (Application Direct) 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 theStart menu. From the Windows Start menu, select DDBMA Plugin for SQL ServerManagement Studio.

Configure general table restore settingsTo configure SQL table-level restores with the Microsoft app agent for Application Direct SSMSplug-in, you must first specify general table restore options on the Database Restore > Generalpage.

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.

Figure 29 Application Direct - Table Restore-General page

The Microsoft application agent caches SQL Server restore settings. The Microsoftapplication agent automatically loads the information from the last recovery operation andpopulates restore settings. Caching saves time by eliminating the need to reselect thesettings each time you run a restore operation. To clear the cached settings, click ClearCache.

Restoring Application Direct Backups

180 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 181: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

2. Use the DataDomain Server field to select Data Domain or PowerProtect X400 server andthe storage unit to restore the data. A storage unit contains the backed-up SQL Serverhosts.

Note: When you want to restore a replicated backup from a secondary Data Domain orPowerProtect X400 server, select the relevant server. The Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 servermust 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. Selectthe Windows cluster name in the case of federated backups.

To perform a redirected restore, select the SQL Server host where you want to restore thebackup to.

4. From the SQL Server Instance list, select the SQL Server instance that contains thebackup.

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 Browsetime field.

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. Usethe 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 torestore.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 settingsWhen 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.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 181

Page 182: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 30 Application Direct - Table Restore-Options page

All settings on the Options page are optional.

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 unuseddrive 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 backupimage must be dismounted. The default value is 8. The valid range is between 1 and 24hours.

4. To select the level of information recorded in the logs which can be used in troubleshootingrecovery issues, select Select a debug level.

Levels range 0-9, with 0 representing no information and 9 representing the most amount ofinformation. 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 whilemounting 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.

Restoring Application Direct Backups

182 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 183: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Monitor the table restore mount operationAfter a table-level restore mount operation is run from the Microsoft app agent for ApplicationDirect 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 31 Application Direct - Table Restore-Monitor page

Note: For information about the success or failure of the restore operation, review the log filesthat are located in the installation folder. The typical location of the log files is C:\ProgramFiles\DPSAPPS\MSAPPAGENT\logs.

Restore table-level data using ItemPointAfter 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 Microsoftapplication agent SSMS plug-in.

About this task

Once the table level restore is configured and run through the Microsoft application agent SSMSplug-in, ItemPoint launches.

If you select Do not run ItemPoint after mounting the backup images when you configure thetable level restore, you must manually launch ItemPoint, and then launch the Data Wizard.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 183

Page 184: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Procedure

1. On the Select Source page, select the source backup files from the mounted volume thatcontains the SQL backup data as shown in the following figure, and then click Next.

Figure 32 ItemPoint Data Wizard: select the source files

2. On the Select Target Server page, specify the details and login credentials for the targetSQL 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 moreinformation on using ItemPoint for Microsoft SQL Server to restore table-level data.

Restoring Application Direct Backups

184 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 185: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 notrun ItemPoint after mounting the backup images when you configure the mountoperation, the backup image remains mounted for 4 hours. To dismount the backupmanually, use the msagentadmin command.

Performing SQL Server disaster recoveryWhen a disaster scenario occurs, the Microsoft application agent supports disaster recovery ofdata located on both a Data Domain server and Data Domain Cloud Tier.

Perform SQL Server disaster recoveryThe 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 targetinstance.

6. Restore all the user databases to the target instance.

Perform disaster recovery from the Data Domain Cloud TierThe Microsoft application agent provides a command line tool to complete disaster recovery ofsave 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 PerformSQL Server disaster recovery on page 185, you must restore the backup indexes from the DataDomain Cloud Tier.

When the Microsoft application agent moves a backup to the cloud, the index files are maintainedon the active tier. A copy of the index files is created and moved to the cloud tier for long-termretention.

After an MTree is restored during a disaster recovery, all the files that resided only on the activetier 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 flagto restore the indexes.

After the indexes are recalled to the active tier, the data save sets for the same time range are alsorecalled unless you type n when prompted with Continue with the recall of the foundsave sets [y/n]. If you choose to not recall the save sets, you can manually recall the savesets later.

Restoring Application Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 185

Page 186: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Type the msagentadmin.exe administration command with the following syntax to recallthe 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

Specifies an operation to recall save sets for disaster recovery.You can use the -M alias for the --dr-recall parameter.

--ddhost "<Data_Domain_server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

--ddpath "<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_username>"

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 datalocated on a Data Domain Cloud Tier device:

Example 33 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 34 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

186 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 187: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 7

Restoring Storage Direct Backups

This chapter includes the following sections:

l ProtectPoint restore workflow.............................................................................................188l Best practices to restore SQL Server with Storage Direct...................................................189l Restore a backup from a secondary Data Domain system.................................................... 190l Restoring SQL Server databases......................................................................................... 192l Performing rollback restores............................................................................................... 205l Restore an availability group to an alternate instance.......................................................... 216l Restoring SQL Server table-level data................................................................................. 217l Performing SQL Server disaster recovery with Storage Direct........................................... 229

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 187

Page 188: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

ProtectPoint restore workflowThe ProtectPoint restore workflow is different for RecoverPoint and VMAX.

Storage Direct with RecoverPoint restore workflowThe Storage Direct with RecoverPoint restore workflow includes the following steps:

1. The database administrator starts a Storage Directrestore by running the database nativerecovery tool on the recovery host.

2. The database native recovery tool requests the Microsoft application agent to restore therequired data, and provide a backup handle.

3. The Microsoft application agent looks in its own catalog to find the requested backup, whichconsists of static images on the Data Domain system.

4. The Microsoft application agent instantiates the corresponding static images that are presenton 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 recoveryhost, which can be either the original application host or a different host, and copies therequired files to the requested locations.

6. If the DBA selects a rollback restore to the original host, the Microsoft application agentrequires 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 rollbackrestore, the Microsoft application agent requires the RecoverPoint cluster to restore the entireconsistency group to the original source LUNs. If the consistency group that you restorecontains multiple LUNs, all the LUNs are overwritten, and inaccessible during the rollbackrestore, 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 tomake the database consistent or to roll forward to a time after the backup occurred. If the logs arenot present on the application host, the Microsoft application agent restores the logs and appliesthem 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 workflowThe 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 therecovery host.

2. The database native recovery tool requests the Microsoft application agent to restore therequired data, and provide a backup handle.

3. The Microsoft application agent looks in its own catalog to find the requested backup, which isa 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 theVMAX LUN, which is known as the Microsoft application agent's restore LUN.

l During all other restore operations, the Microsoft application agent instantiates thecorresponding static image to a Data Domain vdisk device, which is an encapsulatedFAST.X LUN on a VMAX array. The FAST.X LUN is known as the Microsoft applicationagent'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

Page 189: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

If the DBA selects a rollback restore to the original host, then the Microsoft application agentperforms 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 agentperforms 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 tomake the database consistent or to roll forward to a time after the backup occurred. If the logs arenot present on the application host, the Microsoft application agent restores the logs and appliesthem 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 DirectThe following are the best practices to restore SQL Server by using the Microsoft applicationagent 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 dateand time display language can be set to non-English characters. However, database and pathnames must be written in ASCII characters only. Naming conventions for backups with StorageDirect on page 135 provides more information on supported characters for database and instancenames.

Stop VSS when you stop VSS Storage Direct Hardware Provider

When you manually stop or restart VSS Storage Direct Hardware Provider, you must stop orrestart 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 thatis 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 onlycrash-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 agentdoes not know about the excluded volumes for the backup because there is no special safetycheck.

The XtremIO and VMAX LUNs must contain data for only one type of application server. Forexample, if you are using a LUN to back up SQL Server data, the same LUN cannot be used toprotect Exchange Server data. If the LUNs contain data from more than one type of applicationserver, 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 notsupport the feature.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 189

Page 190: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configure usage limits for Data Domain streams

Configure a sufficient number of Data Domain streams for better performance of backups andrestores. 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 concurrentlyexecuted for each database. Databases are sequentially backed up and restored. When you usestripes, 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 aboutstreams limit, impact of exceeding the limits, and configuring the usage limits.

Restore a backup from a secondary Data Domain systemYou must meet certain configuration requirements before you can browse and restore backupsfrom a secondary Data Domain system.

Before you begin

Ensure that the Data Domain collection replication pair is deleted. The Data Domain OperatingSystem 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 secondaryData Domain system.

Procedure

1. Replicate the Mtree (storage unit) that has the Data Domain backup catalog informationfrom the primary Data Domain system to the secondary Data Domain system using the DataDomain System Manager.

2. Replicate the vdisk pool from the primary Data Domain system to the secondary DataDomain system using the Data Domain System Manager.

3. Register the vdisk pool with the Data Domain vdisk user who will run the backup by typingthe following command on the secondary Data Domain system:

vdisk pool register <vdisk_pool> user <ddvdisk_user>

4. Use the show list command to list the vdisk static-image information on the secondaryData Domain system. The list should reflect the static image information that is available onthe 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 DataDomain system to the secondary Data Domain system. However, the vdisk devices in thereplicated vdisk pool have no associated WWN. Hence, the Microsoft application agentcannot use them as restore devices. To prepare the restore LUNs on a secondary DataDomain 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

Page 191: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

a. To create the vdisk pool, run the following command:

vdisk pool create <pool-name> user <user-name>

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 <device-group-name> pool <pool-name>

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 <count>] capacity <n> {MiB|GiB|TiB|PiB|sectors} pool <pool-name> device-group <device-group-name>

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 DataDomain 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 DataDomain system and the new vdisk devices.

The following table lists the Data Domain parameters you must set to the secondary Data Domainsystem, either directly in the restore command or in the configuration file. There are no specificparameters for secondary Data Domain systems so set these parameters as you would for aprimary system.

Table 16 Restore parameters to point to a secondary DD system

Parameter Description

DDBOOST_USER=<DD_Boost_username> Specifies the username of the DD Boost user configuredon the secondary Data Domain system.

DDVDISK_USER=<vdisk_username> Specifies the DD vdisk username that was specifiedduring creation of the replication vdisk device pool on thesecondary Data Domain system.

DEVICE_HOST=<Data_Domain_server_name> Specifies the hostname as the fully qualified domainname of a secondary Data Domain system.

DEVICE_PATH=<storage_unit_name> Specifies the name of the storage unit or a top-leveldirectory within the storage unit on a secondary DataDomain system.

RESTORE_DEVICE_POOL=<Data_Domain_server_restore_device_pool>

Specifies the name of the DD vdisk device pool thatprovides the restore LUNs on the secondary DataDomain system.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 191

Page 192: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Table 16 Restore parameters to point to a secondary DD system (continued)

Parameter Description

RESTORE_DEVICE_GROUP=<Data_Domain_server_restore_device_group>

Specifies the DD vdisk device group in the vdisk devicepool that contains the restore LUNs to use.

Restoring SQL Server databasesThe Microsoft application agent for Storage Direct with SQL Server supports multiple tools torecover databases.

You can recover databases using the Microsoft application agent SQL Server Management Studioplug-in (GUI), Microsoft application agent for Storage Direct commands, or T-SQL scripts.

Restoring SQL Server databases using the Microsoft app agent for StorageDirect 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 operationfrom the command prompt.

l T-SQL Scripts: To generate a backup script in the T-SQL format. You can use the T-SQLscripts 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 StorageDirect.

Note: If the Microsoft App Agent (Storage Direct) button is not on the toolbar, the plug-inmay be unable to register. In this scenario, you can launch the plug-in directly from the Startmenu. From the Windows Start menu, select DDBMA Plugin for SQL Server ManagementStudio.

Configure general database restore settingsTo 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 thedatabase from the Always On availability group before configuring the restore operation. After therestore 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

Page 193: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 34 Storage Direct - Database Restore-General page

2. Click the browse button beside Data Domain Server to select the Data Domain server andthe 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 replicateddatabases to restore, select the relevant server. A Data Domain user on the DataDomain 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 correspondingdatabases.

4. Use the Start browsing from list to select a backup save time, and then click ShowVersions.

The backups that were performed within the specified save time appear in the save setstable.

5. From the SQL Server Instance list, select the SQL Server instance that contains thedatabases 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 isconfigured. 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 databaseper restore operation.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 193

Page 194: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

The corresponding databases appear in the databases table that is below the SQL ServerInstance field.

6. From the databases table, select either the entire SQL Server instance by selecting thecheck 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 restoreoperation.

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 targetdatabase.

Note: The target instance must reside on the same system where the restoreoperation is configured. You cannot restore the backup to an instance on aremote 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 populatedwith the default destination path.To perform a redirected restore, change the destination path by clicking the browsebutton 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

Page 195: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configure file destination settingsView and change the default destination folders of the database files that are data files (.mdfand .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 ifyou 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 clickinside the field to type the folder path.

c. Click the Log file folder browse button to specify a location for the log files, or clickinside the field to type the folder path.

3. To change the destination path at the file group level, perform one of the following actionsin the table:

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 195

Page 196: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 andtype 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 settingsWhen you configure SQL database restores with the Microsoft app agent for Storage DirectSSMS 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

Page 197: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Option Description

RESTORE WITHRECOVERY

To leave the database in the ready-to-use state by rolling backuncommitted transactions, and disable the ability to restore thelatest or additional transaction logs.

RESTORE WITHNORECOVERY

To leave the database in the non-operational state by not rollingback uncommitted transactions, and enable the ability to restorethe latest or additional transaction logs.

3. To compress the restore contents and transport them from the Data Domain Replicator tothe 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, selectSelect 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 defaultvalue is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo large.

6. To enable advanced restore options, type or select one of the following options in theAdvanced options list:

Option Description

KEEP_REPLICATION Preserves the replication when recovering a published database.This option is required if a database was replicated when thebackup was created.

KEEP_CDC Enables change data capture (CDC) recovery. When restoring adatabase with CDC enabled, the recover operation worksdifferently depending on the recovery destination. Use the toKEEP_CDC option to:

l Recover the CDC enabled database with a different name onthe same SQL instance.In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on a different SQL serverinstance.In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on the same SQL instanceby 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

Page 198: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

8. To use the client name that is provided as-is without converting it to the fully qualifieddomain name (FQDN), select Exclude client name resolution.

Use this option to restore backups taken with Microsoft application agent version 4.5 orearlier 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 haschanged 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 Generalpage.

The Microsoft application agent does not support the tail-log backup of multipledatabases.

10. Under Restore Method, specify the details for the device that you want the restoreoperation to use:

l For VMAX environments, to restore with a FAST.X restore device, perform the followingsteps:

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 storagegroup 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 restoringfrom 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 localsnapshots.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 anybackup 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 containsthe 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 selectedon the General page.

c. In the Device Group field, type the name of the restore device group that containsthe vdisk devices and the restore device pool that you want to use to perform therestore operation.Ensure that device group belongs to the Data Domain server that you have selectedon the General page.

Note: To mount VMAX static images and restore the data directly from DataDomain, ensure that the vdisk devices are masked to the application host. TheData 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

Page 199: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Monitor the restore operationAfter a database restore operation is run from the Microsoft app agent for Storage Direct SSMSplug-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 filesthat are located in the installation folder at<Microsoft_application_agent_install_path>\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 commandTo restore SQL Server databases, run the following command:

msagentrc.exe -A "NSR_RESTORE_TYPE=regular [<options>] <path>

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

Page 200: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Syntax for database restores with RecoverPoint

Use the msagentrc.exe command with the following syntax for Storage Direct withRecoverPoint restore operations:

msagentrc.exe -c <client_or_hostname> A "RP_MGMT_HOST=<RecoverPoint_hostname>" -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_HOST=<Data_Domain_server>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A "NSR_RESTORE_TYPE=regular -A "RESTORE_DEVICE_GROUP=<restore_device_group>" -A "RESTORE_DEVICE_POOL=<restore_device_pool>" [<optional_parameters>] -I --t <save_time> <restore_path>

where:

-c <client_or_hostname>

Specifies the client name that was used for the backup.

-A "RP_MGMT_HOST=<RecoverPoint_hostname>"

Specifies the name of the RecoverPoint management host.

-A "RP_USER=<RecoverPoint_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=<server_name>"

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 torestore, type the name of the secondary server. A Data Domain user on the secondary DataDomain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_and_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=<restore_device_group>"

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

-A "RESTORE_DEVICE_POOL=<restore_device_pool>"

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

-t <save_time>

Restoring Storage Direct Backups

200 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 201: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby line. Press Enter to move to the next line. A blank line indicates completion of the list.

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 35 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\<return>-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 VMAXrestore operations:

msagentrc.exe -c <client_or_hostname> -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A "NSR_RESTORE_TYPE=regular -A "VMAX_FASTX_RESTORE_SG=<restore_storage_group>" -A "RESTORE_DEVICE_GROUP=<restore_device_group>" -A

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 201

Page 202: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

"RESTORE_DEVICE_POOL=<restore_device_pool>" [<optional_parameters>] -I --t <save_time> <restore_path>

where:

-c <client_or_hostname>

Specifies the client name that was used for the backup.

-A "NSR_DFA_SI_DD_HOST=<server_name>"

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 torestore, type the name of the secondary server. A Data Domain user on the secondary DataDomain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_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=<restore_storage_group>"

Specifies the restore storage group name of the VMAX array that your setup uses for StorageDirect for VMAX. The default value is NsrSnapSG.

-A "RESTORE_DEVICE_GROUP=<restore_device_group>"

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

-A "RESTORE_DEVICE_POOL=<restore_device_pool>"

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

-t <save_time>

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby line. Press Enter to move to the next line. A blank line indicates completion of the list.

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158\dbtest3"

Restoring Storage Direct Backups

202 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 203: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l For a named instance, type the path in one of the following formats:

n To restore a backup of the entire instance, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 36 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=<full_path_to_lockbox>"

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use. If you do not specify a value, the path defaults to theinstallation 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 thedatabase to restore the latest or additional transaction logs. The default value is no.

-A "RENAME_TO=<new_database_name>"

Specifies the new name for the destination database. The selected database will be restoredto the new database. The new name of the database must be a valid SQL database name. Ifthe destination contains a database with the same name as the database that you havespecified, 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 theirsource locations only. If the source database exists, its files can be in use. So, to avoidconflicts for using a new database name, use the -A RELOCATE_TO option along with the -ARENAME_TO option.

-A "INSTANCE_TO=<hostname>\<instance>"

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 203

Page 204: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Performs a redirected restore operation to a SQL Server instance that is different from thesource instance where the backup was taken.

Note: The target instance must reside on the same system where the restore operation isconfigured. You cannot restore the backup to an instance on a remote host.

-A "RELOCATE_TO='<source_file-1>'='destination_folder-1','<source_file-2>'='destination_folder-2',[...]"

Performs redirected restores of the database files that are data files (.mdf and .ndf) and logfile (.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=<alternate_location_path>"

Performs a redirected restore to the specified path.

-A "NSR_SQL_TARGET_DIR=<destination_folder_path>"

Specifies the destination path, to which you want to copy the restored files. You can thenmanually either move the files to the required folder or attach the files to a SQL Serverinstance.Ensure that the destination path is not a root drive, for example, E:\.

-D <debug_level>

Generates detailed logs that you can use to troubleshoot the restore issues. The supporteddebug levels are 1 through 9.

-A "DELETE_DEBUG_LOG_DAYS=<number_of_days>"

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents 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 inthe logs folder at <installation_path>\MSAPPAGENT\logs.

Restore SQL Server databases with T-SQL scriptsThe Microsoft application agent for Storage Direct enables you to generate SQL-CLR script thatyou 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. Theprotectpoint_run_restore command uses the same command options as themsagentrc.exe command. Optional parameters for database-level restores with themsagentrc.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 StudioQuery window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL restore script

USE [master]GODECLARE @returnCode intDECLARE @stdin NVARCHAR(MAX)SET @stdin = '-t 1465210308 -A ADDITIONAL_RESTORES=no -ARENAME_TO=dbtest3 -A "RELOCATE_TO='E:\MSSQL12.MSSQLSERVER00001\MSSQL

Restoring Storage Direct Backups

204 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 205: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

\DATA\Customers.mdf'='F:\NewData', 'E:\MSSQL12.MSSQLSERVER00001\MSSQL\DATA\Customers_log.ldf'='G:\NewLogs' "APPLICATIONS:\SqlServerWriter\LEDMF176%5CMSSQLSERVER00001\TestDB1\"' + CHAR(10) + '-t 1465210307 -AADDITIONAL_RESTORES=no "APPLICATIONS:\SqlServerWriter\LEDMF176%5CMSSQLSERVER00001\dbtest2\"' + CHAR(10) + '-t 1465210306 -AADDITIONAL_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 -', @stdinIF @returnCode <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Performing rollback restoresThe Microsoft application agent for Storage Direct with SQL Server supports multiple tools to rollback volumes.

You can roll back volumes using the Microsoft application agent SQL Server Management Studioplug-in (GUI), Microsoft application agent for Storage Direct commands, or T-SQL scripts.

Considerations for rollback restoresConsider 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. Youcan 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 theMicrosoft application agent, the deleted backups still appear on the Volume Restore tab ofthe Microsoft app agent for Storage Direct plug-in, but the restore operations fail and arelevant 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 haveselected any version other than the latest version of a save set or backup to restore, theMicrosoft 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 Relocatingvolumes to an alternate LUN during a VMAX rollback restore on page 205 before configuringthe restore operation.

Relocating volumes to an alternate LUN during a VMAX rollback restoreThe 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 adifferent VMAX array.

When you restore a volume to an alternate location, the destination volume must have an identicalfile 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 consideredan alternate LUN restore and the same path requirements apply.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 205

Page 206: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note: Relocating a volume to an alternate VMAX LUN is not supported in an environmentwhere application data resides on multiple VMAX storage arrays on the same site. You mustrestore the backup using the original source VMAX LUN.

The following additional requirements apply when relocating a volume to an alternate LUN on aVMAX 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 youmust restore the backup from Data Domain.

Perform rollback restores with the Microsoft app agent for Storage DirectSSMS 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 operationfrom the command prompt.

l T-SQL Scripts: To generate a backup script in the T-SQL format. You can use the T-SQLscripts 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 StorageDirect.

Note: If the Microsoft App Agent (Storage Direct) button is not on the toolbar, the plug-inmay be unable to register. In this scenario, you can launch the plug-in directly from the Startmenu. From the Windows Start menu, select DDBMA Plugin for SQL Server ManagementStudio.

Configure general volume restore settingsTo 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 > Generalpage.

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

Page 207: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 39 Storage Direct - Volume Restore page

2. Click the Data Domain Server browse button to select the Data Domain server and thestorage 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 replicateddatabases to restore, select the relevant server. A Data Domain user on the secondaryData 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 thecorresponding databases.

4. Use the Start browsing from list to select a backup save time, and then click ShowVersions.

The backups that were performed within the specified save time appear in the save setstable.

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 setstable.

6. Select the appropriate SQL Server instance in the save sets table.

The selected instance and databases contained in that instance appear in the databasestable.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 207

Page 208: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 tableare read-only because the Microsoft application agent does not support partialrestore of a consistency group.

b. In the Restore To column, use the drop-down list to select location where you want torecover the databases.

The original source location is selected by default but you can restore the backup to analternate location.

Note: The target instance must reside on the same system where the restoreoperation is configured. You cannot restore the backup to an instance on a remotehost.

8. To start the volume restore, click Run.

View files in the backupTo 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

Page 209: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 thedatabase and volume where each file resides.

3. To start the restore operation, click Run.

Configure volume restore optionsWhen you configure SQL volume restores with the Microsoft app agent for Storage Direct SSMSplug-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

Page 210: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 selectthe RecoverPoint appliance.

3. For VMAX, in the Storage Group field, type the restore storage group name of the VMAXarray 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 VMAXarray, select Restore from Data Domain even if there is a local VMAX snapshotavailable.

Note: To mount the static image, and restore data directly from Data Domain, ensurethat you have masked the FTS restore devices to the application host. The VMAXdocumentation provides information about how to mask the FTS devices.

5. To generate detailed logs, which you can use to troubleshoot the restore issues, selectSelect 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 anumber between 1 and 32767 days in the Delete debug logs after field. The default value is0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <install_path>\MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo large.

Restoring Storage Direct Backups

210 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 211: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 Requireconfirmation 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 operationAfter a volume restore operation is run from the Microsoft app agent for Storage Direct SSMSplug-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 Restorefailed message appears.

Note: Review the log files that are available in the<Microsoft_application_agent_for_SQL_Server_installed_folder>\DPSAPPS

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 211

Page 212: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

\MSAPPAGENT\logs folder for information about the success or failure of the restore. Thetypical location is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Perform rollback restores with the Storage Direct restore commandTo restore SQL Server volumes, run the following command:

msagentrc.exe -A "NSR_RESTORE_TYPE=lunresync" [<options>] <path>

Syntax for rollback restores with RecoverPoint

Use the msagentrc.exe command with the following syntax for Storage Direct withRecoverPoint volume restore operations:

msagentrc.exe -c <client_or_hostname> -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A "NSR_RESTORE_TYPE=lunsync -A "RP_MGMT_HOST=<RecoverPoint_management_hostname>" -A "RP_USER=<RecoverPoint_management_host_username> [<optional_parameters>] -I --t <save_time> <restore_path>

where:

-c <client_or_hostname>

Specifies the client name that was used for the backup.

-A "RP_MGMT_HOST=<RecoverPoint_hostname>"

Specifies the name of the RecoverPoint management host.

-A "RP_USER=<RecoverPoint_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=<server_name>"

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 torestore, type the name of the secondary server. A Data Domain user on the secondary DataDomain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_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 <save_time>

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby 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

Page 213: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 37 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 VMAXvolume restore operations:

msagentrc.exe -c <client_or_hostname> -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A "NSR_RESTORE_TYPE=lunsync [<optional_parameters>] -I --t <save_time> <restore_path>

where:

-c <client_or_hostname>

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

Page 214: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-A "NSR_DFA_SI_DD_HOST=<server_name>"

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 torestore, type the name of the secondary server. A Data Domain user on the secondary DataDomain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_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 <save_time>

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby line. Press Enter to move to the next line. A blank line indicates completion of the list.

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

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=<full_path_to_lockbox>"

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use. If you do not specify a value, the path defaults to theinstallation 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

Page 215: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-A "ADDITIONAL_RESTORES={yes | no}"

Specifying yes disables the ability to roll back uncommitted transactions and uses thedatabase to restore the latest or additional transaction logs. The default value is no.

-A "RENAME_TO=<new_database_name>"

Specifies the new name for the destination database. The selected database will be restoredto the new database. The new name of the database must be a valid SQL database name. Ifthe destination contains a database with the same name as the database that you havespecified, 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 theirsource locations only. If the source database exists, its files can be in use. So, to avoidconflicts for using a new database name, use the -A RELOCATE_TO option along with the -ARENAME_TO option.

-A "INSTANCE_TO=<hostname>\<instance>"

Performs a redirected restore operation to a SQL Server instance that is different from thesource instance where the backup was taken.

Note: The target instance must reside on the same system where the restore operation isconfigured. You cannot restore the backup to an instance on a remote host.

-A "RELOCATE_TO='<source_file-1>'='destination_folder-1','<source_file-2>'='destination_folder-2',[...]"

Performs redirected restores of the database files that are data files (.mdf and .ndf) and logfile (.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 <debug_level>

Generates detailed logs that you can use to troubleshoot the restore issues. The supporteddebug 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 isavailable locally on the VMAX array.

-A "DELETE_DEBUG_LOG_DAYS=<number_of_days>"

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents 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 inthe logs folder at <installation_path>\MSAPPAGENT\logs.

Restore SQL Server volumes with T-SQL scriptsThe Microsoft application agent for Storage Direct enables you to generate SQL-CLR script thatyou 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_TYPEoption 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

Page 216: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

You must provide a VARCHAR type parameters to this command. Theprotectpoint_run_restore command uses the same command options as themsagentrc.exe command. Optional parameters for rollback restores with the msagentrc.execommand on page 214 provides information about the restore command options.

You can use any SQL Server standard interfaces such as, the SQL Server Management StudioQuery window and T-SQL command prompt to run the SQL-CLR scripts.

Sample T-SQL volume level or LUN level restore script

USE [master]GODECLARE @returnCode intDECLARE @stdin NVARCHAR(MAX)SET @stdin = '-t 1465211083 -A ADDITIONAL_RESTORES=no APPLICATIONS:\SqlServerWriter\' + CHAR(10);EXEC @returnCode = dbo.protectpoint_run_restore ' -cledmf176.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 -', @stdinIF @returnCode <> 0BEGINRAISERROR ('Fail!', 16, 1)END

Confirming the status of a rollback restoreProcedure

1. Open the msagentsv.log log file from the following path:

<Microsoft_application_agent_install_path>\DPSAPPS\MSAPPAGENT\logs2. 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 thesemessages to appear.

Restore an availability group to an alternate instanceThe Microsoft application agent supports restoring an availability group backup to an alternateinstance 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 onlythrough 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

Page 217: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

a. Launch the Microsoft application agent SQL Server Management Studio (SSMS) plugin.

b. Configure a restore operation of availability group databases from either the DatabaseRestore or Volume Restore tab using the Windows cluster name in the SQL Serverhost 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 theRestore To column.

Note: The target instance must reside on the same system where the restoreoperation is configured. You cannot restore the backup to an instance on a remotehost. For volume restores, the target instance must match the file system layout asthe 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 DatabaseRestore 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 WITHNORECOVERY.

c. Specify the same alternate target location that was configured on the primary node usingone 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 theRestore 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 availabilitygroup using the Join only option.

Restoring SQL Server table-level dataThe Microsoft application agent supports table-level recovery of SQL Server data using theStorage Direct SSMS plug-in or Storage Direct commands.

Note: The Microsoft application agent does not support T-SQL scripts to perform tablerestores.

Restore SQL Server table-level data with the Microsoft app agent for StorageDirect SSMS plug-in

Before you begin

Ensure that you have installed ItemPoint to perform table restores. Otherwise, the Table Restoretab 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

Page 218: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 StorageDirect.

Note: If the Microsoft App Agent (Storage Direct) button is not on the toolbar, the plug-inmay be unable to register. In this scenario, you can launch the plug-in directly from the Startmenu. From the Windows Start menu, select DDBMA Plugin for SQL Server ManagementStudio.

Configure general table restore settingsTo 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 thedatabase from the Always On availability group before configuring the restore operation. After therestore 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 > Generalpage.

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

Page 219: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 43 Storage Direct - Table Restore General page

2. Click the browse button beside Data Domain Server to select the Data Domain server andthe 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 replicateddatabases to restore, select the relevant server. A Data Domain user on the DataDomain 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 correspondingdatabases.

4. Use the Start browsing from list to select a backup save time, and then click ShowVersions.

The backups that were performed within the specified save time appear in the save setstable.

5. Use the SQL Server Instance list to select the name of the SQL Server instance thatcontains 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 ServerInstance field.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 219

Page 220: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

6. From the databases table, select the database that contains the tables that you want torestore.

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 settingsWhen you configure SQL table-level restores with the Microsoft app agent for Storage DirectSSMS 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. Youcannot edit the value in this field.

l Select Do not run ItemPoint after mounting the backup images if you do not wantItemPoint GUI to launch after you run the mount operation.Selecting this option disables the Leave backup images mounted after ItemPoint exitsoption, and enables you to perform manual table-level restores.

Restoring Storage Direct Backups

220 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 221: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l To leave the backup images in the mounted state after you close ItemPoint, select Leavebackup images mounted after ItemPoint exits.This option is enabled only if you have not selected the Do not run ItemPoint aftermounting the backup images option.

You can manually browse the backup images, inspect the images, and then dismount theimages by using the msagentadmin.exe dismount command. Dismount backupimages with the msagentadmin dismount command on page 228 provides information.

3. To generate detailed logs, which you can use to troubleshoot the restore issues, selectSelect 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 defaultvalue is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo 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 qualifieddomain name (FQDN), select Exclude client name resolution.

Use this option to restore backups taken with Microsoft application agent version 4.5 orearlier that use the short name as the client name.

7. Under Restore Method, specify the details for the device that you want the restoreoperation to use:

l For VMAX environments, to restore with a FAST.X restore device, perform the followingsteps:

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 storagegroup 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 restoringfrom 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 localsnapshots.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 anybackup 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 containsthe 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 selectedon the General page.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 221

Page 222: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

c. In the Device Group field, type the name of the restore device group that containsthe vdisk devices and the restore device pool that you want to use to perform therestore operation.Ensure that device group belongs to the Data Domain server that you have selectedon the General page.

Note: To mount VMAX static images and restore the data directly from DataDomain, ensure that the vdisk devices are masked to the application host. TheData 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 operationAfter a table restore mount operation is run from the Microsoft app agent for Storage DirectSSMS 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<Microsoft_application_agent_install_path>\DPSAPPS\MSAPPAGENT\logsfolder for information about the success or failure of the mount and the dismount. The defaultlocation is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restoring Storage Direct Backups

222 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 223: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

When the mount operation succeeds, ItemPoint for Microsoft SQL Server GUI launches, unlessyou select the Do not run ItemPoint after mounting the backup images option when youconfigure the mount operation.

Restore table-level data using ItemPointAfter 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 Microsoftapplication agent SSMS plug-in.

About this task

Once the table level restore is configured and run through the Microsoft application agent SSMSplug-in, ItemPoint launches.

If you select Do not run ItemPoint after mounting the backup images when you configure thetable 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 thatcontains 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 targetSQL 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

Page 224: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 moreinformation 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 notrun ItemPoint after mounting the backup images when you configure the mountoperation, the backup image remains mounted for 4 hours. To dismount the backupmanually, use the msagentadmin command.

Restore SQL Server table-level data with Storage Direct commandsYou can restore SQL Server table-level data by mounting backups with Storage Direct mountcommand, 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=<restore_device_pool>" -A "RESTORE_DEVICE_GROUP=<restore_device_group>" -c <client_or_hostname> -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -I - -t <save_time> <restore_path>

where:

-A NSR_RESTORE_TYPE=mount

Specifies a mount operation

-A "RESTORE_DEVICE_POOL=<restore_device_pool>"

Restoring Storage Direct Backups

224 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 225: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

-A "RESTORE_DEVICE_GROUP=<restore_device_group>"

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

-c <client_or_hostname>

Specifies the client name that was used for the backup.

-A "NSR_DFA_SI_DD_HOST=<server_name>"

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 torestore, type the name of the secondary server. A Data Domain user on the secondary DataDomain server must be in the same group as the primary Data Domain server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit that contains the backup.

-t <save_time>

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby line. Press Enter to move to the next line. A blank line indicates completion of the list.

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 225

Page 226: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Example 38 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 ItemPointProcedure

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 thatcontains 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 targetSQL 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

Page 227: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 moreinformation 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 backupsThe Microsoft application agent supports command line tools to list and dismount mountedbackups.

List mounted backups with the msagentadmin command

To list mounted backups, run the following command:

msagentadmin mounts --ddhost "<server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" [<optional_parameters>]

where:

--ddhost "<server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

--ddpath "/<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_user>"

Specifies the username of the DD Boost user.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 227

Page 228: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Dismount backup images with the msagentadmin dismount command

To dismount the backup images after the restore completes, run the following command:

msagentadmin dismount --ddhost "<server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" [<optional_parameters>]

where:

dismount

Specifies an operation to dismount backups.

--ddhost "<server_name>"

Specifies the name of the Data Domain server that contains the storage unit, to which youbacked up the databases.

--ddpath "/<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_username>"

Specifies the username of the DD Boost user.

Example 39 Dismount command

msagentadmin.exe dismount --ddhost "ledmd035.lss.example.com" --dduser "DD163_user" --ddpath "/SU_DD163" --lockbox "C:\Program Files\DPSAPPS\common\lockbox"

Example 40 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 themsagentadmin command:

--deleteDebugLog <number_of_days>

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents 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 logsfolder at <installation_path>\MSAPPAGENT\logs.

--debug <level_1_through_9>

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

Page 229: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Prints a brief help message.You can use the -h alias for the --help parameter.

--config "<configuration_file_path>"

Specifies the full path to the configuration file.You can use the -z alias for the --config parameter.

--lockbox <lockbox_path>

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use.If you do not specify a value, the path defaults to the installation path, which is typicallyC:\Program Files\DPSAPPS\common\lockbox.

--bybackupid <backupid>

Specifies to display the backup ID for mounted backups.

--bypath <path>

Specifies to display the mount path for mounted backups.

--byssid <ssid>

Specifies to display the save set IDs for mounted backups.

Performing SQL Server disaster recovery with Storage DirectAbout 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 havecreated.

5. After the restore completes, manually create the logs folder in the SQL Server installationfolder, and start the SQL Server service.

Note: After the disaster recovery completes, the SQL Server service does notautomatically start because the logs folder is not present in the SQL Server installationfolder. The Microsoft application agent for Storage Direct with SQL Server backupoperation does not back up the SQL Server installation logs folder even if the selectedinstance contains the logs folder.

Restoring Storage Direct Backups

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 229

Page 230: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Restoring Storage Direct Backups

230 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 231: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 8

Restoring Virtual Machine Backups with VMDirect

This chapter includes the following sections:

l Overview of SQL Server virtual machine restore operations ...............................................232l Prerequisites....................................................................................................................... 232l Restoring SQL Server databases to a virtual machine......................................................... 233l Performing SQL Server table-level recovery to a virtual machine........................................248l Performing an instant access recovery............................................................................... 259

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 231

Page 232: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Overview of SQL Server virtual machine restore operationsUse the Microsoft application agent tools to restore full and transaction log backups created by aPowerProtect virtual machine application-aware protection policy. The backups are restored to aSQL 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 theprotected SQL Server.

The Microsoft application agent automatically stores the Data Domain or PowerProtect X400 hostand login information from the protection settings that are configured in the PowerProtectprotection policy. This automatic configuration occurs when the SQL Server virtual machine assetis added to the PowerProtect protection policy.

You can use the Microsoft app agent for VM Direct SQL Server Management Studio (SSMS) plug-in or the command prompt to perform the restore operations. T-SQL scripts are not supportedwith VM Direct.

The Microsoft application agent can perform a database restore, table-level restore, or databaseinstant access restore to the source virtual machine or an alternate virtual machine. To performrestores 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 aMicrosoft Always On availability group (AAG). The AAG databases are indexed against the AAGcluster name. Full backups index the AAG database for all the AAG cluster nodes for one cycle ofbackup. Transaction log backups occur only on the preferred node. You may restore the AAGdatabase to any copy. When you restore an AAG database for the purpose of adding back into theAAG, you may restore to any AAG database copy but first remove the database from the AAG, asrequired by Microsoft. Once the restore is complete, you must add the database back into the AAGand re-seed the replicas.

PrerequisitesAn environment must meet the following requirements for application-aware virtual machinerestore 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 mustmatch the number of disks at a minimum.

For example, a virtual machine with 7 disks requires one SCSI controller but a virtual machinewith 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 thatis configured with file share witness.

l The SQL writer service must be running.

Restoring Virtual Machine Backups with VM Direct

232 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 233: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l The full computer name and FQDN for the SQL virtual machine that are added in theapplication-aware protection policy must be identical and have the DNS resolve.

l The user account that is configured in the PowerProtect protection policy must have access toperform backup and recovery operations.

To configure the required permissions, perform the following steps on each protected SQLServer instance:

1. Create a SQL Login with the user account configured in the PowerProtect protectionpolicy.

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 isa discovered asset of PowerProtect.

Note: If you are restoring data to an alternate location to a SQL Server virtual machine thatis not protected in PowerProtect, you must manually install the Microsoft application agenton the target virtual machine before you can restore the data. The PowerProtect MicrosoftApplication Agent Installation Guide provides instructions to install the Microsoft applicationagent for VM Direct. When you configure the restore operation, you must manuallyregister the Data Domain or PowerProtect X400 server, PowerProtect appliance, andlockbox details.

Restoring SQL Server databases to a virtual machineLearn how to restore Microsoft SQL Server database backups taken in a PowerProtect virtualmachine application-aware protection policy.

You can restore database full and transaction log backups from the primary Data Domain orPowerProtect X400 system or from the secondary Data Domain or PowerProtect X400 system ifreplication is enabled for the PowerProtect protection policy. However, when you are restoringfrom the secondary Data Domain or PowerProtect X400 system, the tail-log backup option is notsupported.

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 cloudusing Data Domain Cloud Tier. This support is available for Amazon Web Services (AWS) andElastic Cloud Storage (ECS) profiles.

For a SQL database recovery from backups that have been tiered using an application-awareworkflow, 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 cloudusing 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 atail-log backup when the associated full backup has been tiered to the cloud. For example, thefollowing 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.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 233

Page 234: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

l TLOG5: 12:00 p.m.

In this case, the restore of the FULL1, TLOG1, or TLOG2 backup fails with the error messagebecause the FULL1 backup has been tiered to the cloud. The restore of the FULL2, TLOG4, orTLOG5 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 VM Direct SSMS plug-inLearn how to perform a VM Direct SQL Server database restore operation using the Microsoft appagent for VM Direct SSMS plug-in.

Launch the Microsoft app agent for VM Direct SSMS plug-in

About this task

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. On the toolbar, click Microsoft App Agent (VM Direct).

The Microsoft app agent for VM Direct window appears.Note: If the Microsoft App Agent (VM Direct) button is not on the toolbar, the plug-inmay be unable to register. In this scenario, you can launch the plug-in directly from thestart menu. From the Windows Start menu, select DDBMA Plugin for SQL ServerManagement Studio.

Configure general database restore settingsTo configure SQL restores with the Microsoft app agent for VM Direct SSMS plug-in, you mustfirst specify general restore options on the Database Restore > General page.

Procedure

1. Open the Microsoft app agent for VM Direct window to the Database Restore > Generalpage.

The General page appears as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

234 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 235: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 50 VM Direct: Database Restore General page

2. Beside Data Domain Server, click ...

The Data Domain Server List & Lockbox Settings window appears and lists the DataDomain or PowerProtect X400 server and lockbox that is configured in the PowerProtectprotection policy. If the protection policy is configured for replication, the secondary DataDomain or PowerProtect X400 server and storage unit also appear.

3. In the Data Domain Server List & Lockbox Settings window, select the Data Domain orPowerProtect X400 server that contains the backup, and then click OK.

Note: If you are restoring the backup to an alternate virtual machine that is notprotected in a PowerProtect protection policy, contact the PowerProtect administratorto retrieve the Data Domain or PowerProtect X400 host details for the protection policyassociated with the original virtual machine. You must also request the PowerProtectadministrator to perform either of the following actions:

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 theselected 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, whichenables you to browse the list of AAGs hosted on this cluster.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 235

Page 236: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

If you are restoring a clusterless AAG database, you must select the AAG group name, whichenables you to browse the list of AAGs hosted on the clusterless AAG group. In the case of aclusterless AAG, the AAG name plus GUID is displayed.

5. Use the Start browsing from list to select a backup save time, and then click ShowVersions.

The SQL Server Instance field and save sets table are updated with the backups that arewithin the specified browse time. If no level full backups are found in the specified timerange, you are prompted for confirmation to load the latest full backup.

Note: If you selected a cluster name or AAG group name with GUID in the precedingstep, then the list of AAGs in the cluster or the list of AAGs in the AAG group namedwith GUID is displayed instead of the list of SQL Server instances.

6. From the SQL Server Instance list, select the SQL Server instance that contains thedatabases that you want to restore.

The databases located on the SQL Server instance appear in the database table below theSQL Server Instance field.

7. From the database table, select either the entire SQL Server instance by selecting thecheck 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 andtimestamp 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 andinstance-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.

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 thebackup.

Restoring Virtual Machine Backups with VM Direct

236 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 237: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note:If you are restoring the backup to an alternate instance, the data and log files areautomatically relocated to the target SQL instance default data and log path. Youcan change the file destination settings on the Files page.

If you are restoring an AAG database, select the target instance that is part of theAAG for the restore. You must remove the database from the AAG first. You canadd 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 backupwill be restored to.If the database exists, the operation prompts you for confirmation to overwrite thedatabase.

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 populatedwith the default destination path.

To perform a redirected restore, change the destination path by clicking ... beside theFolder 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 backupsare 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 settingsView and change the default destination folders of the database files that are data files (.mdfand .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 isselected 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 automaticallyrelocated to the target SQL instance default data and log path. You can change the filedestination settings on the Files page.

Ensure that the SQL Server administrative account for the target SQL Server instance hasaccess to the selected path so that it can access the database files once they are mounted.

Procedure

1. From the left panel, click Files.

The Files page appears as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 237

Page 238: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 52 VM 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 clickinside the field to type the folder path.

c. Click the Log file folder browse button to specify a location for the log files, or clickinside the field to type the folder path.

3. To change the destination path at the file group level, perform one of the following actionsin 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 andtype 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 VM Direct

238 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 239: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configure database restore optionsWhen you configure SQL database restores with the Microsoft app agent for VM Direct SSMSplug-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 AAGfirst. You can add the database back to the AAG after the restore completes. If you have notremoved the database from the AAG before you start the restore, the restore UI displays aprompt about the requirement.

Procedure

1. From the left panel, click Options.

The Options page appears as shown in the following figure.Figure 53 VM Direct: Database Restore Options page

2. In the Recovery state list, select one of the following options, as required:

Option Description

RESTORE WITHRECOVERY

(Default) To leave the database in the ready-to-use state byrolling back uncommitted transactions, and disable the ability torestore the latest or additional transaction logs.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 239

Page 240: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Option Description

RESTORE WITHNORECOVERY

To leave the database in the non-operational state by not rollingback uncommitted transactions, and enable the ability to restorethe latest or additional transaction logs.

3. To compress the restore contents and transport them from the Data Domain Replicator tothe 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, selectSelect 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 defaultvalue is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo large.

6. To enable advanced restore options, type or select one of the following options in theAdvanced options list:

Option Description

KEEP_REPLICATION Preserves the replication when recovering a published database.This option is required if a database was replicated when thebackup was created.

KEEP_CDC Enables change data capture (CDC) recovery. When restoring adatabase with CDC enabled, the recover operation worksdifferently depending on the recovery destination. Use the toKEEP_CDC option to:

l Recover the CDC enabled database with a different name onthe same SQL instance.In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on a different SQL serverinstance.In this scenario, KEEP_CDC is required.

l Recover the CDC enabled database on the same SQL instanceby 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 forconfirmation to load the latest full backup.

8. To use the client name that is provided as is without converting it to the fully qualifieddomain name (FQDN), select Exclude client name resolution.

Restoring Virtual Machine Backups with VM Direct

240 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 241: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Use this option when you restore to a virtual machine in a different domain that does nothave name resolution for the source client, or when the source host is no longer available.

Note: You must select Exclude client name resolution before you start a clusterlessAAG restore.

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 transactionlogs that has changed from the previous backup. The restore operation does not restore thelogs of the previous tail-log backup.

Note:The tail-log backup feature through the SSMS plug-in is not supported for AAG. Onlyscheduled transaction log backups through a PowerProtect protection policy may beperformed.

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 X400MTree replication enabled and you select the secondary Data Domain orPowerProtect 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 thePowerProtect appliance that protects the SQL Server in a protection policyautomatically appear.

b. If you do not see the PowerProtect appliance that you want to use for the restoreoperation, click Add, and then in the Add PowerProtect Data Manager details dialogbox, perform one of the following actions:

l To add a PowerProtect with credential-based authentication, specify the appliancehostname and the login credentials.

Contact the PowerProtect administrator to retrieve the PowerProtect appliance hostand login details.

l To add a PowerProtect with certificate-based authentication, specify only theappliance hostname. Do not specify the username and password fields.

To use certificate-based authentication, the PowerProtect administrator mustwhitelist the target Microsoft application agent.

When you add a virtual machine to a protection policy, that virtual machine iswhitelisted with a certificate that expires after one day. If you are restoring to analternate virtual machine that is an asset of PowerProtect but not a member of aprotection policy, the PowerProtect must whitelist the target virtual machine.

The PowerProtect administrator can approve (whitelist) the target Microsoftapplication 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.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 241

Page 242: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Monitor the database restore operationAfter a database restore operation is run from the Microsoft app agent for VM 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 54 VM Direct: Database Restore Monitor page

Note: For information about the success or failure of the restore operation, review the log filesthat are located in the installation folder. The location of the log files when the Microsoftapplication agent is installed in the default path is C:\Program Files\DPSAPPS\MSAPPAGENT\logs.

Restore a SQL Server database with the VM Direct recover commandLearn how to perform a VM Direct 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 VM Direct:

msagentrc.exe -A VM_DIRECT=TRUE -A "NSR_RESTORE_TYPE=regular" -c <client_or_hostname> -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A

Restoring Virtual Machine Backups with VM Direct

242 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 243: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

"DM_HOST=<PowerProtect_appliance_hostname>" [<optional_parameters>] -I --t <save_time> <restore_path>

where:

-A VM_DIRECT=TRUE

Specifies to use the VM Direct workflow for the recover operation.

-A "NSR_RESTORE_TYPE=regular"

Specifies to perform a database level restore.

-c <client_or_hostname>

Specifies the client name that was used for the backup.

-A "NSR_DFA_SI_DD_HOST=<server_name>"

Specifies the name of the Data Domain or PowerProtect X400 server that contains thebackup.When you have a remote (secondary) Data Domain or PowerProtect X400 server that hasreplicated databases to restore, type the name of the secondary server. A Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server mustbe in the same group as the primary server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_and_path>"

Specifies the name and the path of the storage unit that contains the backup.

-A "DM_HOST=<PowerProtect_appliance_hostname>"

Specifies the PowerProtect appliance hostname or IP address.

-t <save_time>

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby line. Press Enter to move to the next line. A blank line indicates completion of the list.

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 243

Page 244: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Example 41 Example VM Direct 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 backupUse the ddbmsqlrc command to restore a transaction log from the command prompt for VMDirect workflow backups. This command may be used if the database full backup was restored inthe NORECOVERY state.

Run the following command to restore database transaction logs in a stand-alone environmentwith VM Direct:

ddbmsqlrc.exe -a VM_DIRECT=TRUE -a "NSR_DFA_SI_DD_HOST=<server_name>" -a "NSR_DFA_SI_DD_USER=<DD_Boost_user>" -a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -c <client_or_hostname> [-a "SKIP_CLIENT_RESOLUTION=TRUE"] -t <last_backup_time_stamp> -S normal -a "RESTORE_START_TIME= <start_date_and_time>" <restore_path>

Restoring Virtual Machine Backups with VM Direct

244 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 245: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

where:

-A VM_DIRECT=TRUE

Specifies to use the VM Direct workflow for the recover operation.

-a "NSR_DFA_SI_DD_HOST=<server_name>"

Specifies the name of the Data Domain or PowerProtect X400 server that contains thebackup.When you have a remote (secondary) Data Domain or PowerProtect X400 server that hasreplicated databases to restore, type the name of the secondary server. A Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server mustbe in the same group as the primary server.

-a "NSR_DFA_SI_DD_USER=<DD_Boost_user>"

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

-a "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit that contains the backup.

-c <client_or_hostname>

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 toskip the FQDN lookup to automatically resolve the client name.

-t "<last_backup_time_stamp>"

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 mostrecent or additional transaction logs.

-a "RESTORE_START_TIME=<start_date_and_time>"

Restores all the backups that were performed at or after a specified backup time (start dateand time) and up to the backup time of the selected save set, that is, -t<Last_Backup_Time_Stamp>.Specify the start date and time in the <mm>/<dd>/<yyyy> <hr>:<mins>:<secs> {AM | PM}format.

The start date and time must not be after the backup time of the selected save set, that is, -t<Last_Backup_Time_Stamp>.

"<restore_path>"

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:]<database>

[[MSSQL:]<database> [...]]For example: "MSSQL:database1" "MSSQL:database2"

l For a named instance, type the path in one of the following formats:

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 245

Page 246: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

n To restore backups of the entire instance, type MSSQL$<Instance_Name>:n To restore backups of specific databases, type MSSQL

$<Instance_Name>:<database> [...]For example: "MSSQL$SqlInst1:database1" "MSSQL$SqlInst1:database2"

Example 42 Example VM Direct 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 VM Direct database-level restores

You can use the following optional parameters with the msagentrc.exe command.

-A "NSR_DFA_SI_DD_LOCKBOX_PATH=<full_path_to_lockbox>"

Specifies the folder that contains the lockbox file, which contains encrypted informationabout the registered hosts and the corresponding usernames in pairs. Each pair is associatedwith a password that backups use. If you do not specify a value, the path defaults to theinstallation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

-A "DM_USER=<PowerProtect_appliance_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 iswhitelisted by PowerProtect.

When you add a virtual machine to a protection policy, that virtual machine is whitelisted witha 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=<PowerProtect_appliance_port_number>"

Specifies the port number to communicate with the PowerProtect server. The default value is8443.

Restoring Virtual Machine Backups with VM Direct

246 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 247: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-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=<PowerProtect_log_tag>"

Specifies the PowerProtect log tag.

-A "ADDITIONAL_RESTORES={yes | no}"

Specifying yes disables the ability to roll back uncommitted transactions and uses thedatabase to restore the latest or additional transaction logs. The default value is no.

-A "RENAME_TO=<new_database_name>"

Specifies the new name for the destination database. The selected database will be restoredto the new database. The new name of the database must be a valid SQL database name. Ifthe destination contains a database with the same name as the database that you havespecified, 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 theirsource locations only. If the source database exists, its files can be in use. So, to avoidconflicts for using a new database name, use the -A RELOCATE_TO option along with the -ARENAME_TO option.

-A "INSTANCE_TO=<hostname>\<instance>"

Performs a redirected restore operation to a SQL Server instance that is different from thesource instance where the backup was taken.

Note: The target instance must reside on the same system where the restore operation isconfigured. You cannot restore the backup to an instance on a remote host.

-A "RELOCATE_TO='<source_file-1>'='destination_folder-1','<source_file-2>'='destination_folder-2',[...]"

Performs redirected restores of the database files that are data files (.mdf and .ndf) and logfile (.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=<alternate_location_path>"

Performs a redirected restore to the specified path.

-A "NSR_SQL_TARGET_DIR=<destination_folder_path>"

Specifies the destination path, to which you want to copy the restored files. You can thenmanually either move the files to the required folder or attach the files to a SQL Serverinstance.Ensure that the destination path is not a root drive, for example, E:\.

-D <debug_level>

Generates detailed logs that you can use to troubleshoot the restore issues. The supporteddebug levels are 1 through 9.

-A "DELETE_DEBUG_LOG_DAYS=<number_of_days>"

Deletes debug log files that are older than the specified number of days. The valid range isbetween 1 and 32767. By default, debug logs are not deleted. Regularly deleting debug logsprevents 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 inthe logs folder at <installation_path>\MSAPPAGENT\logs.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 247

Page 248: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Performing SQL Server table-level recovery to a virtualmachine

To recover table-level data, you can use the SSMS plug-in to first mount the backup, and then useItemPoint 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 thetarget virtual machine.

The Microsoft application agent sends a request to the PowerProtect appliance to mount theselected backup.

When the backup is mounted, the VMDK images from the virtual machine image backup are addedto the target-virtual machine and assigned mount points.

The backup is mounted with the PowerProtect appliance for 4 hours by default. The valid range forthe mount timeout is between 1 and 24 hours, after which the mounted backup must bedismounted.

Note: When backup images are mounted, you cannot start a new session of backup, databaserestore, table-level restore, or instant access.

Restore SQL Server tables with the VM Direct SSMS plug-inLearn how to perform a VM Direct SQL Server table-level restore operation using the Microsoftapp agent for VM Direct SSMS plug-in.

Launch the Microsoft app agent for VM Direct SSMS plug-in

About this task

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. On the toolbar, click Microsoft App Agent (VM Direct).

The Microsoft app agent for VM Direct window appears.Note: If the Microsoft App Agent (VM Direct) button is not on the toolbar, the plug-inmay be unable to register. In this scenario, you can launch the plug-in directly from thestart menu. From the Windows Start menu, select DDBMA Plugin for SQL ServerManagement Studio.

Configure general table restore settingsTo configure SQL table-level restores with the Microsoft app agent for VM Direct 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 VM Direct window to the Table Restore > Generalpage.

The General page appears as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

248 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 249: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 55 VM Direct: Table Restore General page

2.Beside Data Domain Server, click .

The Data Domain Server List & Lockbox Settings window appears and lists the DataDomain or PowerProtect X400 server and lockbox that is configured in the PowerProtectprotection policy. If the protection policy is configured for replication, the secondary DataDomain or PowerProtect X400 server and storage unit also appear.

3. In the Data Domain Server List & Lockbox Settings window, select the Data Domain orPowerProtect 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 theselected 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, whichenables you to browse the list of AAGs hosted on this cluster.

If you are restoring a clusterless AAG database, you must select the AAG group name, whichenables you to browse the list of AAGs hosted on the clusterless AAG group. In the case of aclusterless AAG, the AAG name plus GUID is displayed.

5. Use the Start browsing from list to select a backup save time, and then click ShowVersions.

The SQL Server Instance field and save sets table are updated with the backups that arewithin the specified browse time. If no level full backups are found in the specified timerange, you are prompted for confirmation to load the latest full backup.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 249

Page 250: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note: If you selected a cluster name or AAG group name with GUID in the precedingstep, then the list of AAGs in the cluster or the list of AAGs in the AAG group namedwith GUID is displayed instead of the list of SQL Server instances.

6. From the SQL Server Instance list, select the SQL Server instance that contains thedatabases that you want to restore.

The databases located on the SQL Server instance appear in the database table below theSQL Server Instance field.

7. From the databases table, select the database that contains the tables that you want torestore.

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 optionsWhen you configure SQL table-level restores with the Microsoft app agent for VM Direct SSMSplug-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.

Restoring Virtual Machine Backups with VM Direct

250 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 251: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 56 VM 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. Youcannot edit the value in this field.

l In the Mount Timeout list, specify the number of hours, after which the mountedbackup image must be dismounted. The default value is 4, and the value cannot be morethan 24 hours.

l To prevent ItemPoint from launching after you run the mount operation, select Do notrun ItemPoint after mounting the backup images.Selecting this option disables the Leave backup images mounted after ItemPoint exitsoption, and enables you to perform manual table-level restores.

l To leave the backup images in the mounted state after you close ItemPoint, select Leavebackup images mounted after ItemPoint exits.This option is enabled only if you have not selected the Do not run ItemPoint aftermounting the backup images option.

3. To generate detailed logs, which you can use to troubleshoot the restore issues, selectSelect 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 defaultvalue is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 251

Page 252: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo 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 forconfirmation to load the latest full backup.

6. To use the client name that is provided as is without converting it to the fully qualifieddomain name (FQDN), select Exclude client name resolution.

Use this option when you restore to a virtual machine in a different domain that does nothave name resolution for the source client.

Note: You must select Exclude client name resolution before you start a clusterlessAAG restore.

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 thePowerProtect appliance that protects the SQL Server in a protection policyautomatically appear.

b. If you do not see the PowerProtect appliance that you want to use for the restoreoperation, click Add, and then in the Add PowerProtect Data Manager details dialogbox, perform one of the following actions:

l To add a PowerProtect with credential-based authentication, specify the appliancehostname and the login credentials.Contact the PowerProtect administrator to retrieve the PowerProtect appliance hostand login details.

l To add a PowerProtect with certificate-based authentication, specify only theappliance hostname. Do not specify the username and password fields.To use certificate-based authentication, the PowerProtect administrator mustwhitelist the target Microsoft application agent.

When you add a virtual machine to a protection policy, that virtual machine iswhitelisted with a certificate that expires after one day. If you are restoring to analternate virtual machine that is an asset of PowerProtect but not a member of aprotection policy, the PowerProtect must whitelist the target virtual machine.

The PowerProtect administrator can approve (whitelist) the target Microsoftapplication 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 operationAfter a table-level restore mount operation is run from the Microsoft app agent VM Direct SSMSplug-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 Virtual Machine Backups with VM Direct

252 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 253: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 57 VM Direct: Table Restore Monitor page

Note: For information about the success or failure of the restore operation, review the log filesthat are located in the installation folder. The typical location of the log files is C:\ProgramFiles\DPSAPPS\MSAPPAGENT\logs.

Restore table-level data using ItemPointAfter 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 Microsoftapplication agent SSMS plug-in.

About this task

Once the table level restore is configured and run through the Microsoft application agent SSMSplug-in, ItemPoint launches.

If you select Do not run ItemPoint after mounting the backup images when you configure thetable 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 thatcontains the SQL backup data as shown in the following figure, and then click Next.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 253

Page 254: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 58 ItemPoint Data Wizard: select the source files

2. On the Select Target Server page, specify the details and login credentials for the targetSQL 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.

4. Use ItemPoint to browse and restore the individual tables.

Note: The PowerProtect ItemPoint for Microsoft SQL Server User Guide provides moreinformation 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 notrun ItemPoint after mounting the backup images when you configure the mount

Restoring Virtual Machine Backups with VM Direct

254 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 255: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

operation, the backup image remains mounted for 4 hours. To dismount the backupmanually, use the msagentadmin command.

Restore SQL Server tables with the VM Direct recover commandLearn how to perform a VM Direct SQL Server table-level restore operation using a commandprompt.

Mount VM Direct backups for table-level recovery using the command promptUse the msagentrc.exe command with the -A NSR_RESTORE_TYPE=mount parameter tomount backups for table-level recovery.

Type the recover command with the following syntax to mount VM Direct backup images:

msagentrc.exe -A VM_DIRECT=TRUE -c <client_or_hostname> [-A "SKIP_CLIENT_RESOLUTION=TRUE"] -A NSR_RESTORE_TYPE=mount -A "NSR_DFA_SI_DD_HOST=<server_name>" -A "NSR_DFA_SI_DD_USER=<DD_Boost_username>" -A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>" -A "DM_HOST=<PowerProtect_appliance_hostname>" [-A "DM_USER=<PowerProtect_appliance_tenant_user>"] [-A "DM_PORT=<PowerProtect_appliance_port_number>"] [-A "DM_MOUNT_TIMEOUT=<number_of_minutes>"] [-A "NSR_DFA_SI_DD_LOCKBOX_PATH=<full_path_to_lockbox>"] -I - -t <save_time> <restore_path>

where:

-A VM_DIRECT=TRUE

Specifies to use the VM Direct workflow for the recover operation.

-c <client_or_hostname>

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 toskip the FQDN lookup to automatically resolve the client name.

-A NSR_RESTORE_TYPE=mount

Specifies a mount operation

-A "NSR_DFA_SI_DD_HOST=<server_name>"

Specifies the name of the Data Domain or PowerProtect X400 server that contains thebackup.When you have a remote (secondary) Data Domain or PowerProtect X400 server that hasreplicated databases to restore, type the name of the secondary server. A Data Domain orPowerProtect X400 user on the secondary Data Domain or PowerProtect X400 server mustbe in the same group as the primary server.

-A "NSR_DFA_SI_DD_USER=<DD_Boost_username>"

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

-A "NSR_DFA_SI_DEVICE_PATH=<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit that contains the backup.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 255

Page 256: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

-A "DM_HOST=<PowerProtect_appliance_hostname>"

Specifies the PowerProtect appliance hostname or IP address.

-A "DM_USER=<PowerProtect_appliance_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 iswhitelisted by PowerProtect.

When you add a virtual machine to a Lifecycle group, that virtual machine is whitelisted with acertificate 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=<PowerProtect_appliance_port_number>"

(Optional) Specifies the port number to communicate with the PowerProtect server. Thedefault value is 8443.

-A "DM_MOUNT_TIMEOUT=<number_of_minutes>"

(Optional) Specifies the amount of time in minutes until the mount times out. The defaultvalue is 4 hours (240 minutes).

-A "NSR_DFA_SI_DD_LOCKBOX_PATH=<full_path_to_lockbox>"

(Optional) Specifies the folder that contains the lockbox file, which contains encryptedinformation about the registered hosts and the corresponding usernames in pairs. Each pair isassociated with a password that backups use. If you do not specify a value, the path defaultsto the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

-t <save_time>

Specifies the save time of the backup. Specify this parameter along with the restore path foreach database in the restore operation. The application pauses for you to input this option lineby line. Press Enter to move to the next line. A blank line indicates completion of the list.

<restore_path>

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, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<backup_client_name>\<database_name>\ [...]\

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, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>

n To restore a backup of specific databases, typeAPPLICATIONS:\SqlServerWriter\<URL-encoded_SQL_instance_name>\<database_name>\ [...]\The <URL-encoded_SQL_instance_name> is typically <backup_client_name>%5C<SQL_instance_name>

Restoring Virtual Machine Backups with VM Direct

256 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 257: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

For example: "APPLICATIONS:\SqlServerWriter\LEDMF158%5Cinst1\dbtest3"

Restore table-level data using ItemPointProcedure

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 thatcontains 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 targetSQL Server and database.

The following figure shows the ItemPoint Data Wizard Select Target Server page:

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 257

Page 258: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 moreinformation 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 imagesYou 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 "<server_name>" --ddpath "<storage_unit_name_and_path>" --dduser "<DD_Boost_username>" --dmhost "<PowerProtect_appliance_hostname>" -–dmport “<PowerProtect_appliance_port>” [--lockbox <path>]

where:

dismount

Specifies an operation to dismount backups.

--ddhost "<server_name>"

Specifies the name of the Data Domain or PowerProtect X400 server that contains thestorage unit, to which you backed up the databases.

--ddpath "<storage_unit_name_and_path>"

Specifies the name and the path of the storage unit, to which you backed up the databases.

--dduser "<DD_Boost_username>"

Specifies the username of the DD Boost user.

---dmhost "<PowerProtect_appliance_hostname>"

Restoring Virtual Machine Backups with VM Direct

258 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 259: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Specifies the PowerProtect appliance hostname or IP address.

--dmport “<PowerProtect_appliance_port>”

Specifies the port number to communicate with the PowerProtect server. The default value is8443.

--lockbox <path>

(Optional) Specifies the folder that contains the lockbox file, which contains encryptedinformation about the registered hosts and the corresponding usernames in pairs. Each pair isassociated with a password that backups use. If you do not specify a value, the path defaultsto the installation path, which is typically C:\Program Files\DPSAPPS\common\lockbox.

Example 43 Example VM Direct dismount command (continued)

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 recoveryAn instant access recovery enables you to quickly bring a database online from a point-in-time byrunning the database directly on protection storage, which is added to the host through a backupimage mount.

Instant access recovery overviewInstant access recovery enables you to access a live-mounted SQL database from protectionstorage without restoring the virtual machine or SQL database.

This type of operation is useful for database administrators who must use or query a SQL databasebefore restoring the database due to time and resource constraints.

This feature also supports the migration of mounted disks containing live mounted databases fromprotection storage to production datastore.

When you initiate instant access recovery, the operation locates the corresponding backup virtualdisks and mounts them from the Data Domain or PowerProtect X400 protection storage. Theoperation locates the SQL Server database selected by the database administrator from mounteddisks and connects the database to the SQL Server instance. If transaction logs were selected, thetransaction logs are replayed against the instant access database.

Instant access recovery use casesInstant access recovery to a SQL Server database is useful in a number of cases, including ad hocqueries, 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 databasesfor browsing and finding historical data.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 259

Page 260: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

With SQL instant access recovery, you can browse the history of changes in specific rows ortables quickly by running SQL queries on the mounted database. You can also execute SQL queriesto 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 mounteddatabase.

By performing health checks on the mounted database instead of the live database in theproduction environment, you can reduce the impact on production resources while checking thehealth status.

Disaster recovery

During a disaster recovery, SQL instant access recovery provides temporary access to SQL datawhile 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 beforeyou upload them to the live production database.

Perform an instant access restore with the VM Direct SSMS plug-inLearn how to perform a VM Direct SQL Server instant access restore operation using theMicrosoft app agent for VM Direct SSMS plug-in.

Launching the Microsoft app agent for VM Direct SSMS plug-in

To launch the Microsoft app agent for VM Direct 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, specifythe server information and credentials, and then click Connect.

3. On the toolbar, click Microsoft app agent for VM Direct.

Note: If the Microsoft App Agent (VM Direct) button is not on the toolbar, the plug-in maybe 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 instant access settingsTo configure SQL restores with the Microsoft app agent for VM Direct SSMS plug-in, you mustfirst specify general restore options on the Instant Access > General page.

Procedure

1. Open the Microsoft app agent for VM Direct window to the Instant Access > Generalpage.

The General page appears as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

260 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 261: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 62 VM Direct: Instant Access General page

2. Beside Data Domain Server, click ...

The Data Domain Server List & Lockbox Settings window appears and lists the DataDomain or PowerProtect X400 server and lockbox that is configured in the PowerProtectprotection policy. If the protection policy is configured for replication, the secondary DataDomain or PowerProtect X400 server and storage unit also appear.

3. In the Data Domain Server List & Lockbox Settings window, select the Data Domain orPowerProtect 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 theselected 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, whichenables you to browse the list of AAGs hosted on this cluster.

If you are restoring a clusterless AAG database, you must select the AAG group name, whichenables you to browse the list of AAGs hosted on the clusterless AAG group. In the case of aclusterless AAG, the AAG name plus GUID is displayed.

5. Use the Start browsing from list to select a backup save time, and then click ShowVersions.

The SQL Server Instance field and save sets table are updated with the backups that arewithin the specified browse time. If no level full backups are found in the specified timerange, you are prompted for confirmation to load the latest full backup.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 261

Page 262: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note: If you selected a cluster name or AAG group name with GUID in the precedingstep, then the list of AAGs in the cluster or the list of AAGs in the AAG group namedwith GUID is displayed instead of the list of SQL Server instances.

6. From the SQL Server Instance list, select the SQL Server instance that contains thedatabases that you want to mount for instant access.

The databases located on the SQL Server instance appear in the database table below theSQL Server Instance field.

7. From the database table, select either the entire SQL Server instance by selecting thecheck box in the header row or select only the required databases to mount for instantaccess.

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 systemdatabases. 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 andtimestamp 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 andinstance-level operations, the most recent backup is mounted and the most recenttransaction logs for the browse time are restored.

9. (Optional) To access the database from a specific point-in-time, perform the followingsteps:

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. Forinstant access, a default name is generated, by appending the text "InstantAccess" and adate/time stamp to the original database name. For a single database restore, you maychange this name. For a multiple database restore, you may not change the databasename and the default database name is used.

Restoring Virtual Machine Backups with VM Direct

262 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 263: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configure optional instant access settingsWhen you configure SQL database instant access restores with the Microsoft app agent for VMDirect SSMS plug-in, you can specify optional settings on the Instant Access > Options page.

About this task

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 VM Direct: 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 under the configdirectory of the Microsoft application agent installation path, for example,C:\Program Files\DPSAPPS\MSAPPAGENT\config\mount.

Ensure that the SQL Server administrative account for the target SQL Serverinstance has access to this path so that it can access the database files once theyare mounted.

l In Mount Timeout, specify the number of days after which the mounted backup imagemust be dismounted. The default value is 7 days.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 263

Page 264: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Note: The maximum mount timeout setting is 7 days but can be extended up to 7more days. After the mount starts, you can extend the mount timeout on the InstantAccess > Active Mounts page by specifying the number of days in the Changemount timeout field and clicking Change. The specified number of days are addedto the initial timeout value that was set during the mount. Dismount the mounteddatabase on page 267 provides more details. To preserve any changes that you maketo 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, selectSelect 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 defaultvalue is 0 and does not delete any debug logs.

Note: This option only deletes debug logs named in the default format and located in thelogs folder at <installation_path>\MSAPPAGENT\logs.

Regularly deleting debug logs prevents the log folder on the installation drive from becomingtoo 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 forconfirmation to load the latest full backup.

6. To use the client name that is provided as is without converting it to the fully qualifieddomain name (FQDN), select Exclude client name resolution.

Use this option when you restore to a virtual machine in a different domain that does nothave name resolution for the source client.

Note: You must select Exclude client name resolution before you start a clusterlessAAG restore.

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 protectionpolicy automatically appear.

b. If you do not see the PowerProtect appliance that you want to use for the mountoperation, click Add, and then in the Add PowerProtect Data Manager details dialogbox, perform one of the following actions:

l To add an PowerProtect with credential-based authentication, specify the appliancehostname and the login credentials.

Contact the PowerProtect administrator to retrieve the PowerProtect appliance hostand login details.

l To add an PowerProtect with certificate-based authentication, specify only theappliance hostname. Do not specify the username and password fields.

To use certificate-based authentication, the PowerProtect administrator mustwhitelist the target Microsoft application agent.

Restoring Virtual Machine Backups with VM Direct

264 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 265: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

The PowerProtect administrator can approve (whitelist) the target Microsoftapplication 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 operationAfter an instant access mount operation is run from the Microsoft app agent for VM Direct SSMSplug-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 filesthat are located in the installation folder. The typical location of the log files is C:\ProgramFiles\DPSAPPS\MSAPPAGENT\logs.

Change the mount timeoutAfter the mount starts, you can change the mount timeout on the Instant Access > ActiveMounts page by specifying the number of days in the Change mount timeout field and clickingChange. The mount timeout is changed by the specified number of days.

About this task

Starting with the Microsoft application agent 19.2, a msagentadmin process runs in thebackground with a keep_mount_alive option to keep the mount session active for the numberof days specified by the user. When the user-specified mount period expires, the msagentadminprocess removes the SQL databases and dismounts the instant access session. After a machinereboot, the Microsoft application agent restarts the mount monitoring process to ensure that theuser-specified mount period is maintained. For example, the following monitoring process runs inthe background:

msagentadmin.exe keep_mount_alive --mountperiod <minutes> --dmhost <IP_address> --dmport <port_number> --lockbox "C:\Program Files\DPSAPPS\common\lockbox"

Procedure

1. From the left panel, click Active Mounts.

The Active Mounts page appears as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 265

Page 266: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 65 VM Direct: Instant Access Active Mounts page

2. Use the Change mount timeout control to select the number of days by which you want tochange the mount time.

3. Click Change.

A confirmation dialog box appears.

4. Click OK.

Results

The mount timeout is modified as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

266 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 267: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 66 VM Direct: Instant Access Active Mounts page

Dismount the mounted databaseAfter you mount a database for instant access, you can use the Instant Access > Active Mountspage to dismount the mounted database.

About this task

All settings on the Instant Access > Active Mounts page are optional. If you do not manuallydismount the database, the database will be dismounted when the mount timeout period passes, asspecified on the Instant Access > Options page.

Procedure

1. From the left panel, click Active Mounts.

The Active Mounts page appears as shown in the following figure.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 267

Page 268: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 67 VM Direct: 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 tovMotion the database instead or extend the mount timeout.

3. Click Dismount.

The backup is dismounted.

Configure vMotion data movementAfter you mount a database for instant access, use the Instant Access > Active Mounts pageconfigure 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.

Restoring Virtual Machine Backups with VM Direct

268 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 269: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Figure 68 VM Direct: 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 databaseadministrator checks with the data center administrator or backup administrator about theappropriate datastore to select.

4. In the Disk Provisioning field, select the vdisk provisioning mode to be used for the vMotionoperation.

5. Click Migrate.

Results

The virtual disk is migrated to the selected datastore by using storage vMotion. You can observethe progress in the Monitor window. Once the vMotion is complete, the mount is removed fromthe Active Mounts page as the databases are then on permanent VMDKs on the vCenterdatastore.

Restoring Virtual Machine Backups with VM Direct

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 269

Page 270: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Restoring Virtual Machine Backups with VM Direct

270 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 271: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 VM Direct Issues"

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 271

Page 272: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Troubleshooting

272 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 273: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 9

Troubleshooting Resources

This chapter includes the following sections:

l Error codes in the msagentadmin administration command output......................................274l Expiry tool command return (error) codes...........................................................................274

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 273

Page 274: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Error codes in the msagentadmin administration commandoutput

The Microsoft application agent enables the msagentadmin administration command toreport 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 indicatefailure.

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 fewerrors are consistently or correctly set. So, use the return codes only as a hint or a guide.

Expiry tool command return (error) codesThe Microsoft application agent enables the expiry tool to report the severity of the error and theunique 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 indicatefailure.

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 fewerrors are consistently or correctly set. Use the return codes only as a hint or a guide.

Troubleshooting Resources

274 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 275: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Examples

l When you perform a delete operation, and when there are no backups in the specified savetime range, the following error appears:

C:\Program Files\DPSAPPS\MSAPPAGENT\bin>ddbmexptool -d -z c:\tmp\config.txt -e "10 days ago" -n mssql108012: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 mssqly127178: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 275

Page 276: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Troubleshooting Resources

276 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 277: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 10

Troubleshooting Application Direct Issues

This chapter includes the following sections:

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

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 277

Page 278: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

SQL Server Management Studio plug-in is hiddenIssue

In the Microsoft SQL Server Management Studio (SSMS), the Microsoft app agent for ApplicationDirect 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 agentplug-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 agentplug-in button at the top.

Instant file initialization warning appearsDuring a Application Direct SQL Server restore operation, if you did not enable the instant fileinitialization 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 databaseinstant file initialization feature on the SQL Server.

Application Direct full backup might failIssue

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 virtualmachine:

msagentcon: Microsoft CRT error: R6010

Workaround

Apply the latest Windows update on the virtual machine host.

Troubleshooting Application Direct Issues

278 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 279: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Restore with tail-log backup fails when full backups are tieredto the cloud

Issue

When full backups are tiered to the cloud and you try to perform a restore with tail-log backupsenabled, the tail-log backup succeeds but the restore fails and the database is left in the restoringstate. As a result, the database is unavailable for user transactions and the database is skippedduring subsequent full and tail-log backups.

Note: The database remains in the restoring state until the full backups are recalled to theData 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 thedatabase 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 toolTo enable the PowerProtect Data Manager management of existing backups after you haveupgraded from a previous version of Microsoft application agent, you must run the backupdiscovery tool, AgentBackupDiscovery.exe. The PowerProtect Microsoft Application AgentInstallation 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 theprogram 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 thePowerProtect 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 backupdiscovery tool might not generate the expected breadcrumbs.

As a workaround for this issue, manually create the brownfield_breadcrumbs directory inthe 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 279

Page 280: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Troubleshooting Application Direct Issues

280 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 281: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 11

Troubleshooting Storage Direct Issues

This chapter includes the following sections:

l Troubleshooting mount failures........................................................................................... 282l SQL Server Management Studio plug-in is hidden...............................................................283l Failed to set up SymAPi handle: Unable to list VMax arrays :

SYMAPI_C_NO_SYMM_DEVICES_FOUND....................................................................... 284l Rollback restore fails with the error "The process cannot access the file".......................... 284l ResyncLuns: SymSnapvxControl failed for Target Device = 01441. Error: The Device(s) is

(are) already in the desired state or mode...........................................................................285l Rollback restore fails when the VMAX LUNs are unavailable............................................... 285l The log file contains messages about VSS snapshot failure with code 0x80042306............286l Registry keys are overwritten when the Solutions Enabler is installed after the Microsoft

application agent................................................................................................................. 286l Remove the link between the source devices and the backup (FTS) devices on Data Domain

and terminate the snapvx session........................................................................................ 287

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 281

Page 282: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Troubleshooting mount failuresSometimes 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 <full_path_to_the_configuration_file>

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 <full_path_to_the_configuration_file> --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 <diskshadow> 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

282 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 283: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

\\.\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 <Product_installation_folder>\config\mountsfolder.

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 thefollowing command:

msagentadmin devmaint -z <full_path_to_the_configuration_file>

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 hiddenIssue

In the Microsoft SQL Server Management Studio (SSMS), the Microsoft app agent for ApplicationDirect 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 agentplug-in button.

Troubleshooting Storage Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 283

Page 284: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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 agentplug-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 cannotaccess the file"

Issue

Rollback restore fails with following error:

CreateFile(\\.\PHYSICALDRIVE<name>), 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 tooffline to perform a volume restore. During the volume restore, if any processes access thesedevices, VSS fails and the restore aborts. The devices are offline. You must manually change theirstatus to online.

Workaround

Ensure that the following rollback requirements are met:

l Ensure that you have provisioned the array according to the Solutions Enabler’srecommendations. The Solutions Enabler documentation provides information aboutprovisioning arrays for optimal performance.

l Ensure that external programs, for example, Windows Disk Management, do not use the disks.

Troubleshooting Storage Direct Issues

284 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 285: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

ResyncLuns: SymSnapvxControl failed for Target Device =01441. Error: The Device(s) is (are) already in the desiredstate 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 thefollowing command:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> -snapshot_name <Snapshot_Name> terminate -restored

Rollback restore fails when the VMAX LUNs are unavailableIssue

To perform rollback restores, the VMAX hardware provider uses temporary restore LUNs. If therestore LUNs are not available, the resyncluns operation fails and displays the following message:

ResyncLuns: Failed to select restore eLUN for Static Image <GUID>

When you provision a new VMAX array with production LUNs, you must additionally provide atleast one eLUN. When you perform a restore, the array uses the eLUN to instantiate static imagesbefore 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 toensure 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 eLUNsare offline. Otherwise, when the VSS brings the restored volume online, Windows will detecttwo disks with identical disk signatures. This causes the resync restore operation to fail andcan introduce instability to the array.

Troubleshooting Storage Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 285

Page 286: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

2. Ensure that the restore eLUNs do not have snapshots linked to them by running the followingcommand for each restore eLUN:

symsnapvx -sid <Symmetrix_VMAX_ID> -devs <STD_Device_ID> list

For example: symsnapfx -sid 031 -devs 03E list3. 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_10192016terminate

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 failurewith 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 followingcommand:

regsvr32 /u VSSPPHwp.dll

3. Unload the VSS Storage Direct hardware provider service by performing one of the followingsteps:

l Wait for approximately 15 minutes for the service to automatically unload.

l Restart the host.

Registry keys are overwritten when the Solutions Enabler isinstalled after the Microsoft application agent

Issue

The Solution Enabler should be installed before the Microsoft application agent.

Troubleshooting Storage Direct Issues

286 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 287: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

If you install the Solution Enabler after you install the Microsoft application agent, the VMAXregistry 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 thatcontains 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 snapvxsession

Issue

You may be required to remove the link between the source devices and the backup (FTS) deviceson Data Domain and terminate the snapvx session.

NOTICE Perform this procedure with caution. This action will force all blocks to move in thenext 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 287

Page 288: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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

288 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 289: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

CHAPTER 12

Troubleshooting VM Direct Issues

This chapter includes the following sections:

l Configuring the debug level with the msagentcon.exe program.......................................... 290l Restore fails when a full backup has been moved to the cloud............................................ 290l Restore with tail-log backup fails when full backups are tiered to the cloud.........................291l Application-aware virtual machine full backup might fail...................................................... 291l Application-aware virtual machine backup through protection policy might fail...................292l Full backup might fail when a virtual machine has many SQL databases..............................292l SQL AAG transaction log backup might not be performed.................................................. 292l Restore keeps running when the backup is in the cloud.......................................................293l Transaction log backup depends on last backup before upgrade......................................... 293l Unable to protect a virtual machine with application agent installed in Application Direct mode

............................................................................................................................................ 293

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 289

Page 290: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Configuring the debug level with the msagentcon.exe programYou can configure the Microsoft application agent debug level for backups by using themsagentcon.exe program, which is installed with the software in the directory C:\ProgramFiles\DPSAPPS\MSAPPAGENT\bin.

Run the program as follows, where <n> is the debug level from 0 to 9. The default debug level is 0:

msagentcon.exe --administration --debug=<n>

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 thedebug logs on the virtual machine when the PowerProtect protection group runs. To deactivatethe debug logs, set the debug level to 0.

Restore fails when a full backup has been moved to the cloudIssue

When you try to restore a backup after an associated full backup has been moved to the cloudusing 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 atail-log backup when the associated full backup has been tiered to the cloud. For example, thefollowing 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 messagebecause the FULL1 backup has been tiered to the cloud. The restore of the FULL2, TLOG4, orTLOG5 backup succeeds because the FULL2 backup is in the active tier.

Workaround

Contact the PowerProtect administrator to recall the associated full backup (FULL1 in thisexample) from the cloud tier to the active tier, and then perform the restore.

Troubleshooting VM Direct Issues

290 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 291: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Restore with tail-log backup fails when full backups are tieredto the cloud

Issue

When full backups are tiered to the cloud and you try to perform a restore with tail-log backupsenabled, the tail-log backup succeeds but the restore fails and the database is left in the restoringstate. As a result, the database is unavailable for user transactions and the database is skippedduring subsequent full and tail-log backups.

Note: The database remains in the restoring state until the full backups are recalled to theData 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 thedatabase 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 failIssue

An application-aware virtual machine full backup might fail with the following type of errormessage:

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 virtualmachine:

msagentcon: Microsoft CRT error: R6010

Workaround

Apply the latest Windows update on the virtual machine host.

Troubleshooting VM Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 291

Page 292: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

Application-aware virtual machine backup through protectionpolicy might fail

Issue

An application-aware virtual machine backup performed through a PowerProtect protection policymight fail with the following error message, where xx.xx.xx.xx is the PowerProtect IP address:

PowerProtect agent for Microsoft Applications: Unable to update persisted settings for PowerProtect Data Manager host 'xx.xx.xx.xx': Unable to log in to PowerProtect Data Manager host 'xx.xx.xx.xx'. Received the HTTP code 400 and response 'Invalid FQDN'.

Workaround

When the SQL host is a member of a workgroup but is assigned an IP address that is DNSresolvable by PowerProtect Data Manager, if the DNS resolution is only available for FQDN,ensure that the SQL host adds the same domain suffix to the Advanced TCP/IP parameters DNSsettings.

Full backup might fail when a virtual machine has many SQLdatabases

Issue

When a virtual machine has a large number of SQL databases, a full backup might fail with thefollowing 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 workerthreads 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 SQLcommands in SSMS:

USE masterGO EXEC sp_configure 'show advanced options', 1; GO RECONFIGURE;exec sp_configure 'max worker threads', 900GORECONFIGURE;

SQL AAG transaction log backup might not be performedWhen the configured value of @@SERVERNAME is different from the local hostname, thetransaction log backup is not performed for a SQL Always On availability group (AAG).

Troubleshooting VM Direct Issues

292 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide

Page 293: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

The following Microsoft instructions describe the procedure to change the computer name for aSQL 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 cloudIssue

A restore through the SQL Server Management Studio (SSMS) keeps running when the fullbackup that is being restored is in the cloud. The restore displays the following type of errormessage but continues to run:

ddbmsqlrc: Unable to recover data with save time '<save_time>'. Recall the file '<file_pathname>' from Data Domain Cloud Tier, and restart the recovery.

Workaround

Recall the full backup from the cloud, and retry the restore operation.

Transaction log backup depends on last backup beforeupgrade

Issue

When the first backup after an upgrade to Microsoft application agent 19.1 is a transaction logbackup, the backup fails when the last backup before the upgrade was a full backup. The failedbackup 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 transactionlog backup.

Unable to protect a virtual machine with application agentinstalled in Application Direct mode

Issue

You cannot protect the SQL host with both VM Direct and Application Direct.

You cannot add a virtual machine to a PowerProtect application-aware protection policy when thevirtual 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 theapplication agent is already installed and the selected installation mode does not match thecurrently installed product. The installer log is located in the AppData directory for the useraccount 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 thevirtual machine is located in the directory C:\users\Administrator\AppData\Local\Temp.In this directory, the installer log files are namedMicrosoft_Application_Agent_<timestamp>.log.

Troubleshooting VM Direct Issues

Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide 293

Page 294: Dell EMC PowerProtect Microsoft Application Agent SQL ... · Dell EMC PowerProtect Microsoft Application Agent Version 19.2 SQL Server User Guide 302-005-993 REV 01 September 2019

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, ifneeded.

4. Add the virtual machine in the PowerProtect application-aware protection policy.

Troubleshooting VM Direct Issues

294 Dell EMC PowerProtect Microsoft Application Agent SQL Server User Guide