Dell Storage Solution Resources Owner's Manual

Add to My manuals
57 Pages

advertisement

Dell Storage Solution Resources Owner's Manual | Manualzz

Microsoft SQL Server Database Protection

Using EqualLogic Auto-Snapshot Manager /

Microsoft Edition

Using EqualLogic Auto-Snapshot Manager / Microsoft Edition to perform online

Smart Copy protection and recovery for SQL Server databases hosted on PS Series arrays.

Dell Storage Engineering

September 2014

A Dell Deployment and Configuration Guide

Revisions

The following table describes the release history of this Technical Report.

Report

1.0

2.0

3.0

4.0

Date

January 2012

January 2013

October 2013

Document Revision

Initial Release Auto-Snapshot Manager Microsoft Edition v4.0

Updated with support for ASM/ME 4.5

Updated with support for ASM/ME 4.6

September 2014 Updated with support for ASM/ME 4.7 and 4.7.1

THIS WHITE PAPER IS FOR INFORMATIONAL PURPOSES ONLY, AND MAY CONTAIN TYPOGRAPHICAL ERRORS AND

TECHNICAL INACCURACIES. THE CONTENT IS PROVIDED AS IS, WITHOUT EXPRESS OR IMPLIED WARRANTIES OF

ANY KIND.

© 2014 Dell Inc. All rights reserved. Reproduction of this material in any manner whatsoever without the express written permission of Dell Inc. is strictly forbidden. For more information, contact Dell.

Dell, the DELL logo, EqualLogic, and the DELL badge are trademarks of Dell Inc. Other trademarks and trade names may be used in this document to refer to either the entities claiming the marks and names or their products. Dell disclaims any proprietary interest in the marks and names of others.

2 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

3 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Table of contents

Revisions ............................................................................................................................................................................................. 2

Table of contents .............................................................................................................................................................................. 4

Preface ................................................................................................................................................................................................ 1

Audience ............................................................................................................................................................................................. 1

Dell Online Services .......................................................................................................................................................................... 1

Dell EqualLogic Storage Solutions ................................................................................................................................................. 1

Feedback ............................................................................................................................................................................................ 1

Executive summary .......................................................................................................................................................................... 1

Software and firmware versions ..................................................................................................................................................... 2

1 Introduction ................................................................................................................................................................................ 3

2 Auto-Snapshot Manager /Microsoft Edition ......................................................................................................................... 4

2.1

Volume Shadow Copy Service ..................................................................................................................................... 4

2.2

Auto-Snapshot Manager User Interface ..................................................................................................................... 5

2.3

Overview of HIT Groups ................................................................................................................................................ 6

2.3.1

HIT Groups in Non-Cluster Environments ................................................................................................................. 6

2.3.2

HIT Groups in Cluster Environments ........................................................................................................................... 6

2.4

Multi-Host Management ............................................................................................................................................... 6

3 ASM/ME Smart Copies for SQL Server ................................................................................................................................... 8

3.1

Snapshot Smart Copy ..................................................................................................................................................... 8

3.2

Clone Smart Copy........................................................................................................................................................... 8

3.3

Replica Smart Copy ........................................................................................................................................................ 9

3.4

Smart Copy Object Collections .................................................................................................................................... 9

3.5

Smart Copy Schedules ................................................................................................................................................. 10

4 Setup and configuration best practices ................................................................................................................................ 11

4.1

Database File Layout ...................................................................................................................................................... 11

4.2

Storage Resource Management .................................................................................................................................. 11

4.3

ASM/ME backup documents ....................................................................................................................................... 12

5 Creating SQL Server Database Smart Copies ..................................................................................................................... 17

5.1

Steps to Create Smart Copy Sets ............................................................................................................................... 17

5.1.1

Smart Copy Behavior with SQL Server ...................................................................................................................... 17

6 Restoring SQL Server databases with Smart Copies ......................................................................................................... 20

4 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

6.1

Snapshot Smart Copy restore options ...................................................................................................................... 20

6.2

In-Place database restore ............................................................................................................................................ 22

6.3

SQL Server database restore with Apply Logs option ............................................................................................ 23

6.4

Restore as New or “Side-by-Side” database restore............................................................................................... 25

6.5

Selective restore of SQL Server databases ............................................................................................................... 26

6.6

Clone Smart Copy restore options ............................................................................................................................ 28

7 ASM/ME Operations in a Windows Server Cluster ............................................................................................................. 29

7.1

Protecting clustered SQL Server databases ............................................................................................................. 29

7.2

Recovering SQL Server Data in a failover cluster .................................................................................................... 29

7.2.1

Restore All and Restore selected database .............................................................................................................. 30

7.2.2

Restore as New and Mount ......................................................................................................................................... 30

7.2.3

Restore as New – Drive Letter Option ...................................................................................................................... 31

7.2.4

Restore All as New – Mount Point Option ............................................................................................................... 34

8 Advanced Operations with SQL Server Databases ............................................................................................................ 36

8.1

SQL Server Database Restore to a New Server ....................................................................................................... 36

8.2

SQL Server Database Distribution using Template Databases .............................................................................. 39

8.3

Step by Step Template Database Creation .............................................................................................................. 40

8.4

SQL Server Database Replication using Smart Copies ........................................................................................... 43

8.5

Data Mining or Offloading Operations with Smart Copy Replicas ...................................................................... 44

8.6

SQL Server Database Disaster Recovery with Smart Copy Replicas .................................................................... 46

8.7

Disaster Recovery with Failback Capabilities ........................................................................................................... 46

8.8

Off-Host Backup and Recovery ................................................................................................................................. 47

9 Summary ................................................................................................................................................................................... 49

A Command line options ........................................................................................................................................................... 50

A.1

Scripting ASM/ME v3.1 and Later ................................................................................................................................ 50

Technical Support and Customer Service .................................................................................................................................. 52

5 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Preface

PS Series arrays optimize resources by automating performance and network load balancing. Additionally,

PS Series arrays offer all-inclusive array management software, host software, and free firmware updates.

Visit WWW.DELL.COM/PSseries for more information.

Audience

The information in this guide is intended for administrators that have deployed SQL Server and are interested in using EqualLogic snapshots for efficient protection and recovery of SQL databases.

Dell Online Services

You can learn about Dell products and services using this procedure:

1.

Visit

http://www.dell.com

or the URL specified in any Dell product information.

2.

Use the locale menu or click on the link that specifies your country or region.

Dell EqualLogic Storage Solutions

To learn more about Dell EqualLogic products and new releases being planned, visit the Dell EqualLogic

TechCenter site: http://delltechcenter.com/page/EqualLogic . Here you can also find articles, demos, online discussions, technical documentation, and more details about the benefits of our product family.

Feedback

We encourage readers of this publication to provide feedback on the quality and usefulness of this information by sending an email to [email protected]

.

Executive summary

Dell EqualLogic Auto-Snapshot Manager / Microsoft Edition (ASM/ME) is a protection and management tool for Windows server environments. ASM/ME enables centralized management of aspects pertaining to

EqualLogic SANs. These aspects include protection and recovery, MPIO, and SAN authentication and connectivity.

This document focuses on using Auto-Snapshot Manager with SQL Server for protection and recovery of

SQL databases. This document is intended to be a configuration and best practices guide on how to use

ASM/ME with SQL Server. It discusses different ways to utilize ASM/ME to protect and recover SQL data as well as steps to set up and configure ASM/ME with SQL.

1 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Software and firmware versions

The following table shows the software and firmware used for the preparation of this Technical Report.

Vendor Model Software Revision

Microsoft® Windows Server 2008, 2012 (x86, x64, R2) All Versions*

Microsoft® SQL Server 2008, 2008 R2, 2012, 2014

Dell™ PS Series Array Firmware

Standard and Enterprise

Version 7.0.7, 6.0.11 and later*

Dell™ EqualLogic™ Host Integration Tools –

Auto-Snapshot Manager / Microsoft

Edition

Version 4.6, 4.7, 4.7.1*

*For complete version support see the Host Integration Tools Release Notes or the PS Series Firmware

Compatibility table https://eqlsupport.dell.com/support/download.aspx?id=6442454231 .

The following table lists the documents referred to in this Technical Report. All PS Series Technical Reports are available on the Customer Support site at:

support.dell.com

Vendor

Dell™

Dell™

Dell™

Dell™

Dell™

Document Title

EqualLogic Host Integration Tools v4.7 Documentation

Auto-Snapshot Manager / Microsoft Edition v4.7 User Guide

Technical Report: SQL Server Database Protection with Auto-Snapshot Manager

Microsoft Edition v3.x

Technical Report: SQL Server Database Protection with Auto-Snapshot Manager

Microsoft Edition – Advanced Operations

Dell TechCenter: EqualLogic Technical Content: http://en.community.dell.com/techcenter/storage/w/wiki/2660.equallogictechnical-content.aspx

Dell™ Dell Database Solutions: SQL Server http://www.dell.com/content/topics/global.aspx/sitelets/solutions/software/db/ microsoft_sql_2005_sit?c=us&cs=555&l=en&s=biz

Microsoft® SQL Server Books Online: Overview of the Recovery Models

Microsoft® How to Delay Loading of Specific Services

Microsoft® How to retrieve a specific table or rows from database backups or transaction log backups in SQL server

2 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

1

Introduction

Database protection and disaster recovery are among the top concerns for SQL Server database administrators. Requirements for reducing database backup windows and restore times continue as demands increase for continuous SQL Server database uptime. PS Series arrays provide administrators the ability to create volume based copies of data using snapshots, clones and replicas. These copies are known as “point-in-time” copies of volume data.

The Dell ™ EqualLogic Host Integration Tools for Windows ® includes Auto-Snapshot Manager/Microsoft

Edition (ASM/ME) – enabling the ability to create data- and application-consistent Smart Copies of NTFS volumes, Exchange Server databases, Hyper-V Virtual Machines, SharePoint databases and Farms, and SQL

Server databases. ASM/ME offers application-consistent Smart Copies of SQL Server databases utilizing the built-in snapshot, clone and replication facilities in PS Series arrays. With ASM/ME, a SQL Server administrator can:

 Manage multiple SQL Server instances and hosts to create Smart Copies of SQL databases, where the copy operation is coordinated with SQL server operations.

Use the ASM/ME GUI or built-in scheduler to create Smart Copy sets

Set up automatic e-mail notification of ASM/ME events

Create and manage scripts using the Command Line Interface to coordinate all the operations available through the GUI.

 Allow system or database administrators to recover/restore SQL databases in the following ways:

In-place SQL Server database and volume recovery on stand-alone and clustered systems

“Side-by-side” SQL Server database and volume recovery on the same instance or to new locations using transportable Smart Copies

Recover/Mount database copies on a new system for testing, development, or reporting/data mining operations

Use Smart Copy replicas at a remote location for disaster recovery

 Additional support for SQL Server databases with ASM/ME

Support for using template volumes and thin-clones

Support for database volumes configures with EqualLogic Synchronous Replication

Note: For supported versions of SQL Server and PS Series firmware see the latest Host Integration Tools for Windows – Release Notes.

The capabilities of ASM/ME extend the use of SAN protection facilities beyond storage administrators, to server and database administrators. This raises the productivity of database administrators, and allows them to utilize efficient SAN copy capabilities without requiring SAN privileges. ASM/ME automates data protection operations thus minimizing the time-consuming daily management and maintenance of SQL

Server database protection. As result data availability and productivity is significantly increased. Auto-

Snapshot Manager can maintain data availability at a high level of assurance using Smart Copy technologies and PS Series arrays.

3 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

2

Auto-Snapshot Manager /Microsoft Edition

2.1

Volume Shadow Copy Service

Auto-Snapshot Manager/Microsoft Edition utilizes Microsoft’s Volume Shadow Copy Service (VSS) architecture to provide application integration with SAN copy operations, Figure 1. During the VSS operation flow, Auto-Snapshot Manager initiates the process by requesting the SQL Server VSS Writer to prepare a database for a Smart Copy operation. The SQL Server VSS Writer component places the database in a consistent state and the PS Series VSS Provider service initiates the SAN copy using PS Series hardware snapshots, clones, or replication functions. The end result is a data-consistent point-in-time

“Smart Copy” of the SQL Server database and volumes. Smart Copies can then be used to fully restore a database or simply recover object level data using various recovery options available to the Smart Copy set.

Figure 1 Volume Shadow Copy Service – ASM/ME Integration

4 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

2.2

Auto-Snapshot Manager User Interface

The ASM/ME GUI includes host management capabilities beyond just data protection. There are HIT group summary views, volume views for capacity, utilization, and snapshot reserve, and views for MultiPath session information.

The Hosts or object area (callout 1) shows the hosts that have been added to the managed HIT Group. A

HIT Group is simply a group of hosts managed by that instance of ASM/ME. Each host lists supported component information including SQL Server instances and databases, host volumes, collections, schedules, existing Smart Copies, and MPIO settings.

The main area or Dashboard in the center (callouts 2 & 3) lists detailed information about the selected object. This information can include host information and properties, Smart Copy support options available for the selected object, volume and file information including snapshot reserve and in-use statistics, information about collections and schedules, and individual Smart Copy information.

The actions toolbar (callout 4) will list actions available for a selected object. For example actions can include host management, schedule creation, Smart Copy creation, and restore options for a Smart Copy.

Users can configure property-level attributes such as the location of the Smart Copy backup documents,

PS Group Access used to authenticate hosts to PS Series Groups, host MPIO Settings, and alert information by choosing the Settings option (callout 5).

Figure 2 Auto-Snapshot Manager/Microsoft Edition User Interface

5 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

2.3

Overview of HIT Groups

A HIT Group is a group of one or more hosts that are managed from ASM/ME. HIT Groups are useful because they allow multi-host management from any machine that is running ASM/ME. For example, if an administrator has to manage and backup Microsoft SQL Server databases residing on multiple instances and servers, they can create a HIT Group on a single instance of ASM/ME and manage multiple servers from there.

2.3.1

HIT Groups in Non-Cluster Environments

In non-cluster environments, HIT Groups are host-specific. That is, adding host B to the ASM/ME instance on host A does not automatically add host A to the ASM/ME instance on host B. A HIT Group can also consist of one host. Adding multiple hosts to manage is optional; ASM/ME can also be run from a single host and managed on that local host.

2.3.2

HIT Groups in Cluster Environments

In cluster environments, all cluster nodes in a HIT Group have a reciprocal relationship. That is, adding cluster node B to the ASM/ME instance on cluster node A will automatically add cluster node A to the

ASM/ME instance on cluster node B. All cluster nodes must be added to the HIT Group for proper operation. ASM/ME will then automatically set up the trust relationship between each cluster node. If only a subset of cluster nodes is added to a HIT Group, then data restoration, schedules, and Smart Copy operations could result in fatal errors. When ASM/ME is installed and run from one cluster node, ASM/ME will send a warning if the other nodes have not been included in the HIT Group.

2.4

Multi-Host Management

The design of ASM/ME includes multi-host management or centralized management through a single

ASM/ME instance.

In the past, ASM/ME was managed on each application server and operations were single hosted. Starting with ASM/ME version 4.0, multiple hosts can be managed through the same ASM/ME interface and operations such as setting alerts, backup document locations, notifications, and setting CHAP credentials, can all be applied to each managed host concurrently. In addition hosts can be added to an ASM/ME instance simply by using the Add Hosts feature.

The Add Hosts feature will allow administrators to add new hosts to the ASM/ME instance. Hosts can be looked up in 3 ways, Figure 3, such as discovering through the PS Series Group, browsing the network via

AD lookup, and/or manually entering the host information.

Note: The Computer Browser service must be enabled and started on the ASM/ME host and domain controllers in order to browse the network.

6 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 3 Add Hosts Options in ASM/ME

Each host must be authenticated by a user account that must have admin rights on the managed hosts. If necessary the Add Hosts wizard will install or upgrade the Windows Host Integration Tool kit on the host being added. ASM/ME will then pass a SSL Certificate onto the host for secure communication between the ASM/ME management instance and the managed host. Operations are passed from the management instance to the managed host and run from the managed host. For more information on adding new hosts to an ASM/ME instance please refer to the Auto-Snapshot Manager User Guide.

7 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

3

ASM/ME Smart Copies for SQL Server

Auto-Snapshot Manager/Microsoft Edition (ASM/ME) creates Smart Copies utilizing the built-in PS Series

SAN protection capabilities of volume snapshots, clones, and replicas. The following section will cover the

Smart Copy types and options supported for SQL Server.

All Smart Copies are transportable, and can be mounted on the same or a different server. With proper configuration, SQL hosts configured in a HIT Group can mount (restore) a Smart Copy created by any

other SQL host in the HIT Group. For more information see the Advanced Operations section in this

document.

The Hosts view in ASM/ME lists the SQL Server instances and databases running in the instances. A database residing on PS Series storage will have a blue icon and a database not located on PS Series storage will have a grayed-out icon. The blue icon indicates objects (SQL Server databases, Exchange databases, Hyper-V virtual machines and CSVs, and NTFS volumes) that can be controlled by ASM/ME. At any time, detailed information about an object can be displayed by clicking on the object.

3.1

Snapshot Smart Copy

Snapshot Smart Copies are point-in-time copies of a database and volume(s) at the time of the Smart

Copy operation. Snapshots are the most space-efficient form of a volume or database Smart Copy therefore multiple copies of snapshots can be stored and used for recovery operations. In the PS Series

Group Manager GUI, snapshot Smart Copies are shown under each base volume from which they were created. Snapshot Smart Copies are most useful for quick recovery of the original volume or database.

Using ASM/ME, Smart Copy snapshots can be created and applied to:

 Restore the original volume or database in place by rolling back the source volumes to the pointin-time of the Smart Copy.

 Restore the original SQL Server database allowing additional log file backups or a rolling log restore.

 Selectively restoring a single database from a group or collection of databases on the same host

 Restore a database to a new location or to perform a side-by-side database recovery on the same

SQL instance.

Note: A rolling log restore can be applied if previous log file backups are available. ASM/ME will leave the

SQL Server database in a “Restoring” state to allow additional log file backups to be applied to the restore process. The rolling log restore is a manual process and ASM/ME will not create or manage log file backups or the incremental log recovery process.

3.2

Clone Smart Copy

Clone Smart Copies are exact duplicates of the original volume or volumes including all the data and full size of each volume included in the Smart Copy. Clones are treated and shown as separate volumes in the PS Series Group Manager GUI. Clone Smart Copies are most useful when the original volume or database environment needs to be recreated such as test or development scenario.

8 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

With ASM/ME, Smart Copy clones can be used for Restore All as New or side-by-side restore operations to duplicate production environments or create exact copies of database environments for testing and development scenarios. In addition, these database copies can also be used to offload operations from the production database such as reporting or data mining.

3.3

Replica Smart Copy

Replica Smart Copy options are available if replication is configured in the PS Series group for the volume or volumes that make up a SQL Server database. Replicas are similar to snapshots that are sent from one

PS Series group and stored on another PS Series group, and hold only the changed data from the last replica operation. When using replica Smart Copies it is important to manage the Smart Copy backup documents so they can be accessed by hosts on the remote site or replication partner group.

Replica Smart Copies can be used to recover primary site data at a remote site or enable offload reporting or data mining operations to the remote site. To replicate many databases and volumes, sufficient replication space is required. For more information on PS Series replication and sizing replication space, see the Dell EqualLogic Technical Report,

Understanding Data Replication Between Dell EqualLogic PS

Series Groups

at the following URL: http://en.community.dell.com/dell-groups/dtcmedia/m/mediagallery/19861448/download.aspx

3.4

Smart Copy Object Collections

Smart Copy Collections can be configured to create Smart Copies of a group of components. Objects can be combined into a collection so that snapshot, clone, or replica Smart Copies can be created for a group of objects at the same time. This is especially useful for scheduling Smart Copy operations of similar components or databases sharing the same set of volumes.

During a Restore All operation of an object collection, all database components included in the collection will be placed in a “restoring” state. Client connections for those databases will not be supported while the restore is in progress. To avoid placing all databases in a collection in a “restoring” state use a Selective

Restore process. For more information see the Selective Restore of SQL Server Databases section in this

document.

In previous versions of Auto-Snapshot Manager there was a restriction put in that limited the number of databases allowed in a Smart Copy collection. The restriction has been lifted in Auto-Snapshot Manager v4.6 and is now a warning. See the note below for more information.

Note: Microsoft recommends creating a snapshot backup of fewer than 35 databases at a time. It is recommended to follow the recommendation that Microsoft has set forth. See the following KB article for more information: http://support.microsoft.com/kb/943471 .

9 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

3.5

Smart Copy Schedules

ASM/ME includes a scheduler to enable ongoing Smart Copy protection at various intervals. The ASM/ME scheduler is based on the Windows Task Scheduler service and supports Smart Copy schedules as frequently as 5 minutes. The scheduler supports a “keep count” parameter that retains only the specified number of active Smart Copies for an object. This ensures that storage resources are maintained while data recovery remains highly available. You can create schedules by right-clicking an object or using the

Actions pane of ASM/ME interface.

10 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

4

Setup and configuration best practices

This section details some best practices for using ASM/ME with SQL Server and PS Series groups.

4.1

Database File Layout

To create SQL Server database Smart Copies with ASM/ME, the SQL Server host must be on the same iSCSI network as the PS Series Group and all of the database files must reside on PS Series volumes presented through the SQL server host initiator. ASM/ME recognizes all the underlying volumes that make up the database object.

PS Series Groups enable volume-based data protection. All the data on a selected volume will be protected during a Smart Copy operation. ASM/ME creates an application-consistent Smart Copy of the object or database chosen even if separate database files reside on the same volume. If more than one database shares the same volume, it could result in a ”torn” Smart Copy set of the database(s) not chosen.

To avoid torn smart copies ASM/ME will recognize and prompt the user to select the other objects or databases that reside on the same volumes.

Best Practices: In environments where volumes share database files with other databases, it’s recommended to select all the databases sharing similar volumes to avoid torn Smart Copies.

Note: During restores in these environments a

Restore All

will roll back all the databases associated with the volume recovery. Choose a Selective Restore to recover individual databases. See the procedure for

selective recovery of individual databases later in this doc for more information.

4.2

Storage Resource Management

This section describes how ASM/ME and Smart Copies use storage resources and suggests some best practices for monitoring and managing space used by Smart Copy sets on the PS Series group.

Snapshot Smart Copies use the snapshot reserve space allocated to the volume. The amount of snapshot reserve can be monitored and changed for each volume that makes up a SQL Server database by viewing the volume object in ASM/ME and changing reserve allocations in the PS Series group manager.

When a snapshot Smart Copy is restored as a new database (Side-by-Side Restore), the snapshot continues to exist, and continues to use the snapshot reserve for the volumes that make up the Smart

Copy. Any writes to these snapshots while they are mounted on a host will consume additional snapshot reserve.

Best Practice: Maintain “keep counts” for Smart Copy schedules to minimize overuse of snapshot reserve.

Side-by-side restores of Snapshot Smart Copies are best used as temporary copies of databases. For long term use of a Smart Copy it is recommended to use Clone Smart Copies.

Clone Smart Copies are exact copies as the original volume or object. When you create a clone Smart

Copy, a new volume appears in the Group Manager GUI with the date and timestamp of the Smart Copy

11 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

operation. Clone Smart Copies can be brought online through ASM/ME by using the Restore as New option.

Best Practice: Clone Smart Copies are complete copies of database objects and should be cleaned up after use to avoid storage resource consumption.

Replica Smart Copies are created if replication is configured for a volume or volumes that make up SQL

Server databases. Replication requires a replication partner PS Series Group to store the replica set, and must be set up on both PS Series groups prior to creating a replica Smart Copy. The first replication operation always replicates the total volume data for a SQL Server database volume(s) or NTFS volume.

Each subsequent replication operation only replicates the data that changed for the volume or volumes since the last replication operation. You can monitor and increase the replica reserve through the PS

Group Manager GUI at any time.

Additionally, the Mount as Read-only Smart Copy option halts all replication activity on that Smart Copy

replica set until the replica is un-mounted and demoted. Refer to the Restoring SQL Server Databases with Smart Copies section in this document for more information.

The time it takes to replicate data can vary due to the amount of data being replicated and the bandwidth of the network between the partner groups. For more information on replication see the PS Series

Technical Documents at: http://en.community.dell.com/techcenter/storage/w/wiki/2660.equallogictechnical-content.aspx

Best Practices: Size replication space and network bandwidth according to your network needs. Only use the Mount as Read-only option for temporary use and be sure to un-mount and demote the replica when finished to continue replication on that Smart Copy Set.

4.3

ASM/ME backup documents

Backup documents are the link to recovery operations using ASM/ME and are vital to the Smart Copy restore process. They are XML documents that contain the metadata for the Smart Copy set and are by default stored in a local directory. For ASM/ME to perform a volume or database recovery operation, it needs the backup document associated for that Smart Copy set. Without the backup document there can be no recovery operation with ASM/ME. The location of the backup document folder can be modified within ASM/ME. Figure 4 shows how to modify the backup document folder using the ASM/ME user interface.

12 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 4 ASM/ME backup document location

13 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

For cluster environments the backup document folder must be in a “cluster-accessible” location so each node can read and access the backup docs created from other nodes within the cluster. For stand-alone systems it is recommended that each host have a separate folder within the backup document directory, see Figure 5 below.

Figure 5 ASM/ME Backup Document Best Practice

Note: By default, backup documents created by ASM/ME are saved as files with a .bcd extension. After a smart copy set has been used, the backup document extension is changed to .pvss.

Best Practice: The location for the backup document directory should be managed on a central share that can be backed up regularly. If PS Series replication is configured, the backup document share should be reachable by the primary and remote groups – and, ideally, replicated using technologies such as DFS/R.

Otherwise, the backup documents must be manually transported to the remote site. The following three images show protection options for backup documents.

Figure 6 Backup Document Protection Using a Local Share

14 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

In Figure 6, the protection scenario uses a volume share located on the PS Series group. By using a SAN volume for the backup document share, data protection can be handled using standard PS Series snapshots or any other supported backup application. Using this protection scenario, the backup document path can be mounted on one host and shared among multiple hosts that may need access to the backup documents for restore options.

Figure 7 Backup Document Protection Scenario with Replication

In Figure 7, the protection scenario includes the use of standard PS Series volume snapshot on the local

SAN as well as volume replication to a remote PS Series group. By replicating the backup document share to a replication partner, the backup document files can be incrementally sent to the remote group. Make sure that the backup document replication occurs regularly to ensure restore capabilities at the remote location.

Figure 8 Backup Document Protection Using a Remote Share

In Figure 8, the backup documents reside on a PS Series volume at the remote site and the remote site volume is being accessed by the primary site over the WAN. In the event of a primary site disaster the volume can be accessed by a remote site server and the backup documents will be intact. This example assumes that the volume is being accessed by one host at a time and the backup document path is being shared to additional hosts.

15 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Alternatively, you can configure Distributed File System replication (DFS/R) to replicate backup document files from one server to many servers. This may be a best practice if you are planning to have many servers accessing the same set of backup documents and Smart Copies.

The backup document protection scenarios vary by configuration as well as complexity. With any data protection scenario, you should test and verify your solution before putting it into a production environment. All those involved should be aware of and comfortable with the recovery procedures in the event of a data disaster.

ASM/ME lets you validate all backup documents when it starts. This process makes sure that there are valid Smart Copies located on the PS Series SAN for every backup document listed on the backup document share. You can also validate these documents at any time by right-clicking Smart Copies and selecting “Validate Backup Documents”. If ASM/ME determines there are broken documents or documents that do not associate with any Smart Copies, they are placed in a node called “Broken” in the

Smart Copies object tree.

Best Practice: Remove any broken backup documents by deleting the backup document “Broken” node.

This ensures that all the Smart Copies listed are valid and usable for restore and recovery operations.

16 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

5

Creating SQL Server Database Smart Copies

Your business needs will determine the type of Smart Copy to create using ASM/ME.

If the objective is fast recovery of SQL Server databases, use snapshot Smart Copies because they consume minimal storage resources and can be used for a complete recovery strategy.

If the objective is to create a copy of a SQL Server database for longer duration, clone Smart Copies are recommended because they mirror the original database volume structure.

If there is a remote site available and you want the ability to bring the latest version of SQL Server database information online in the event of a disaster at the primary site or enable the ability to offload reporting or data mining operations from the production site, use replica Smart Copies.

5.1

Steps to Create Smart Copy Sets

All Smart Copies can be created using the same wizard either by right-clicking an object or using the

Actions pane in ASM/ME. Once created, Smart Copies are listed under the Smart Copies Object in the

ASM/ME GUI. The Create Smart Copy wizard will display options allowed by the object based on what type of Smart Copy operation is supported (snapshot, clone, or replica as in Figure 9). After you choose the Smart Copy type, you can choose the application behavior (called the backup type).

5.1.1

Smart Copy Behavior with SQL Server

SQL Server database Smart Copies have two options for backup types (Figure 9) that determine the behavior of the Smart Copy operation on a SQL Server database. The following backup types are available with ASM/ME:

Full – This backup type notifies the SQL Server that there was a backup operation. The operation applies a checkpoint and timestamp to the database log file. For SQL Server environments that use log file backups, this backup type allows log backup files to be applied to the restore process to add additional granularity during the restore process. For more information on applying additional log backup files during a smart

copy restore operation, see SQL Server Database Restore with Apply Logs Option .

Copy – This backup type creates a COPY_ONLY version of the volume or SQL Server database, and specifies an “out-of-band” backup operation that has no effect on other backup operations. This backup type is supported only with SQL Server 2005 and later.

Note: ASM/ME does not truncate the SQL log file. To manage database log growth, individual log backups can be done or the database recovery model can be changed to minimize log growth. For more information on SQL Server database recovery models see: http://msdn.microsoft.com/enus/library/ms189275.aspx

.

17 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 9 Create Smart Copy Window

Choose the Smart Copy type and the behavior based on the planned usage of the Smart Copy (database restore, test DB, development, or another use).

Note: For databases sharing the same volume, the Missing Components or Volumes window is shown

(Figure 10). Torn Smart Copies mean that there were additional object components (database files) on the volume you selected for the Smart Copy. When you restore from a torn Smart Copy, you must do a selective restore to avoid damaging other databases with files on the same volume(s). There is no harm in the torn Smart Copies and they will not affect any databases during the restore process other than the

database chosen for the Smart Copy. For more information see Restoring SQL Server Databases with

Smart Copies

later in this document.

18 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 10 Missing components or volumes

Optionally, create a schedule to create SQL Server database Smart Copies by right clicking on the database and choosing the Configure New Schedule option or from the actions toolbar in ASM/ME if the database is highlighted. You can give the new schedule a name and add options to configure a repeating

Smart Copy schedule. If Notifications are not set up, the schedule service will ask you to configure notification prior to creating the schedule. You can decline, and continue with the Smart Copy schedule or proceed to Notification setup. Similar to creating a single Smart Copy, if there are additional database object components on the volume you choose, the Torn Smart Copy Warning is displayed. To continue with the schedule creation, choose Next to move to the next screen.

19 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

6

Restoring SQL Server databases with Smart Copies

There are various methods to restore and recover SQL Server databases using Smart Copies. The underlying PS Series architecture can either restore a volume from a Smart Copy or mount a Smart Copy online to a host on a mount point or as a new volume. These operations allow many different SQL Server database restore possibilities.

This section describes the most common restore scenarios and how to apply Smart Copy restore options for SQL Server data recovery.

Table 1 SQL Database restore options for Smart Copy types

Restore Option Snapshot

Mount – Mounts the smart copy to a mount point or drive letter (does not restore the database)

Yes

Restore selected database - Restores database in place through a selective restore of selected database

Yes

Yes Restore All - Restores all the volume data in place, the fastest restore option

Restore as New - Restores all the volume data to a new location, side-by-side database restore using a mount point or drive letter.

Yes

Mount as Read-Only – Mounts a replica Smart

Copy to the file system as read-only to a mount point or drive letter.

No

Clone and Restore as New – Creates a clone of a replica Smart Copy and restores the database from the clone to a mount point or drive letter.

No

Clone – Creates volume clones of the volumes that make up a replica Smart Copy. (does not restore the database)

No

Clone

Yes

Yes

No

Yes

No

No

No

Replica

No

Yes on local instance only

No

No

Yes

Yes

Yes

6.1

Snapshot Smart Copy restore options

There are four restore options available for snapshot Smart Copies as shown in Figure 11.

Mount –Mounts the Smart Copy set on mount points or drive letters that you specify. It does not restore the database. By default, the Smart Copy is mounted read-only but optionally you can make the Smart

Copy read-write. Users can then use the mounted Smart Copy for archiving or perform manual steps to recover data.

20 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Restore selected database – Performs an “in-place” database restore and automatically starts a Selective

Database Restore of only the chosen database files. If other databases share the smart copy volumes, the

Selective Restore operation protects other database components from being damaged during the restore process.

Restore All – Performs a restore of all the data in the Smart Copy and brings the database online. If there are multiple databases included in the Smart Copy set, for example, in a collection, all the databases are restored to the point-in-time of the Smart Copy and brought online.

Restore as New – Performs a side-by-side restore to a new location of all the data in the Smart Copy and brings the database online. If there are multiple databases included in the Smart Copy, for example, in a collection, all the databases are brought online as copies of the originals to the point-in-time of the Smart

Copy.

Figure 11 Snapshot Smart Copy Restore Options with ASM/ME

The following sections discuss SQL Server database restore scenarios and how to apply each of the restore options. Some scenarios may use multiple Smart Copy restore options but each option can have a different effect on the restore. Please read through the next sections carefully to understand how each

Smart Copy restore option will affect the SQL Server database environment.

21 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

6.2

In-Place database restore

Assuming the database file layout has followed the best practices guidelines, this restore is useful for performing a fast point-in-time restore of SQL Server databases. The Smart Copy options that can be applied for an in-place SQL Server database restore are:

 Restore All

 Restore selected database

When all the original database files reside on their own volumes, the Restore All operation should be used for the fastest restore operation. The restore process takes the original database and volume offline, restores the database back to the time of the Smart Copy, and brings the volume and database back online to the host and SQL Server. At the same time, the PS Series group creates an additional snapshot of the database volume state before restoring the Smart Copy. This snapshot appears offline in the PS Series

Group Manager GUI and can be used for debugging problems that may have caused the database corruption or failure.

When the original database files share volumes with other databases, the Restore selected database operation should be used to restore an individual database. The Restore selected database operation performs a data movement operation on the SAN to restore only the selected database files. This operation protects the other databases or applications that may have files on the same volume.

Essentially, the restore process automatically invokes a Selective Restore of the chosen database. For

more information on selective restore, see the Selective Restore of SQL Server Databases later in this

section.

Note: The Restore All operation bypasses the selective restore and replaces the original database volume with the contents of the Smart Copy regardless of database file sharing.

The in-place database restore has two options as shown in Figure 12:

Fully recover – This option fully restores the database with the Smart Copy and brings the database online to users at completion.

Apply Logs – This option restores the database to the time of the Smart Copy but leaves the database in a

“restoring” state so that log file backups can be applied for additional point-in-time granularity.

22 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 12 Restore All – In-Place Restore Options

6.3

SQL Server database restore with Apply Logs option

Applying log file backups after a database Smart Copy restore operation is a manual process and is therefore considered an advanced operation. For SQL Server databases running in the “Full Database

Recovery Model”, it is vital to maintain a regular database log backup schedule to control growth of the database log file. For more information on database recovery models, see SQL Server Recovery Models at: http://msdn.microsoft.com/en-us/library/ms189275.aspx

.

1.

Perform a tail log backup of the database being restored. You can do this with a normal log backup command if the database is online. If the database is offline you may need to specify additional clauses to complete the log backup and restore operations. For more information on

Tail-Log Backups see the Microsoft site: http://msdn.microsoft.com/en-us/library/ms179314.aspx

2.

Determine the database Smart Copy closest to the time of the failure for the restore operation.

Once determined, use the most appropriate in-place restore method ( Restore selected databases or Restore All ) and check the Apply Logs button to place the database into a “restoring” state after the Smart Copy restore operation.

3.

Starting with the first transaction log backup that was created after the Smart Copy was restored, restore the logs in sequence with NORECOVERY . After the last log has been applied (tail-log from step 1), completely restore the database WITH RECOVERY to bring the database online fully restored. The following script is an example of this process.

23 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

--Create tail-log backup.

BACKUP LOG testdb

TO DISK = 'Z:\SQLServerBackups\testdb_tail.bak'

WITH NORECOVERY;

GO

--Restore Database using appropriate Smart Copy in ASM/ME with Apply Logs option.

--Restore the regular log backup (from backup set 1).

RESTORE LOG testdb

FROM DISK = 'Z:\SQLServerBackups\testdb_log.bak'

WITH FILE=1,

NORECOVERY;

--Restore the tail-log backup (from backup set 2).

RESTORE LOG testdb

FROM DISK = 'Z:\SQLServerBackups\testdb_tail.bak'

WITH FILE=2,

NORECOVERY;

GO

--Recover the database:

RESTORE DATABASE testdb

WITH RECOVERY;

GO

24 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

6.4

Restore as New or “Side-by-Side” database restore

A side-by-side database restore can be extremely useful to recover object level data within a database without taking the database offline to do so. In ASM/ME, a side-by-side restore of a SQL Server database means importing and mounting the Smart Copy to a host as a new copy of the original database.

The Smart Copy option for a side-by-side SQL Server database restore is:

 Restore as New

This option imports the Smart Copy to the host and brings the database online as a new SQL Server database. This option can also be used to restore a copy of the database to a new server host in your

environment, see Advanced Operations and Management later in this document.

During the restore process you can choose the drive letter or mount point on which to mount each volume as well as rename the database copy, Figure 13.

Figure 13 Restore All as New

Note: When a snapshot Smart Copy is imported, any new writes to the imported object will continue to consume snapshot reserve. It is best practice to use clone Smart Copies if an imported database Smart

Copy is intended to remain online for write operations.

The Restore as New operation can enable database object data or file recovery by performing a manual copy or select/insert operation to copy the file or database object to the production database.

For table and row data recovery see the Microsoft article,

How to retrieve a specific table or rows from database backups or transaction log backups in SQL server:

http://support.microsoft.com/kb/321836 .

25 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

6.5

Selective restore of SQL Server databases

Selective restore of SQL Server databases refers to restoring databases that share the same PS storage volumes with other databases, as well as restoring from Smart Copy collections. During the Smart Copy creation, ASM/ME detects if databases are sharing the same volume with other databases. In that case, a

Torn Smart Copy Warning message is displayed at the time of the Smart Copy creation.

The Smart Copy option used for a Selective Restore of a SQL Server database is:

 Restore selected database

The Selective Restore process creates temporary snapshot clones of the chosen Smart Copy and uses a data offload mechanism on the SAN to perform the copy operation. This offload process replaces the original database files with the files from the clone copy and brings the database online to the server. By utilizing the SAN for the data movement, the file copy process happens much quicker than performing the copy through the file system.

For individual database Smart Copies, the selected database is the only option shown to restore. While the restore is taking place, the database is placed into a “Restoring” state. All other databases that may share the volume or volumes will not be affected by this restore process, Figure 14.

Figure 14 Selective Restore – Individual Database Restoring

26 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

For databases included in a Smart Copy collection, any individual database in the collection may be restored at any time. The advantages of using database Smart Copy collections are:

 A single schedule can create Smart Copies of many databases

 If one of the databases in the collection fails, ASM/ME allows a selective restore of that one database using the Restore selected database option.

 In the event of a volume failure, all the databases sharing the volume can be restored together using the Restore All option.

Note: During a volume restore using the Restore All option all the databases included in the collection are placed into a “restoring” state during the restore process (Figure 15).

The selective restore process can take longer than an instant restore because of the data movement operation that occurs in the background during the restore. The time it takes to restore the selected database is directly affected by the size of the database files being replaced. With PS Series firmware v5.0 and later, this data movement operation is left to the SAN with SAN Data Copy Offload. This offers a much faster data movement operation compared to a file system data movement.

Figure 15 SQL Server Database Collection Restoring

27 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

6.6

Clone Smart Copy restore options

There are three restore options for clone Smart Copies:

Mount – This option mounts the Smart Copy set on the drive letter you specify. It does not restore the database. By default, the Smart Copy is mounted read-only but you can make the Smart Copy read-write.

You can restore the database as a separate step manually.

Restore selected databases – This option allows for a selective restore of a database from a Smart Copy clone

Restore as New – This option performs a side-by-side restore of all the data in the Smart Copy and brings the database online. If there are multiple databases included in the Smart Copy, for example in a collection, all the databases are brought online as copies of the originals to the point-in-time of the Smart

Copy.

These operations perform the same tasks as the snapshot Smart Copy operation. Once mounted on a host system, the clone acts as a normal volume. Clones do not use snapshot reserve but they do require space equal to the size of the base volume.

28 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

7

ASM/ME Operations in a Windows Server Cluster

ASM/ME is fully cluster aware and supports Smart Copies of clustered SQL databases. This section describes the various operations used to protect and recover SQL Server databases in a Failover Cluster.

General understanding of how to configure and administer failover clusters is assumed. For additional information refer to the Host Integration Tools documentation.

Note: At the time of this document, the ASM/ME v4.7.1 support for SQL Server 2014 databases is limited to standard cluster volumes only. There is no support for SQL databases hosted on Cluster Shared

Volumes or Windows Azure Storage.

In order for ASM/ME to operate correctly in a failover cluster the following criteria must be met:

 ASM/ME is installed on each node of the failover cluster

 The ASM/ME backup document location is shared and reachable by all nodes in the cluster

 The EqualLogic VSS Requester service is set to a domain account with SQL and local administrator permissions for each node in the cluster.

 All PS Series volumes must have shared access enabled before adding to a cluster.

Once these criteria have been met and ASM/ME is installed, SQL database protection and recovery operations can begin. All protection and recovery operations must take place from the active node hosting the SQL Server resources in the cluster. If nodes failover ASM/ME will follow the failover process so that schedules and other Smart Copy operations always take place on the active SQL Server cluster node.

Best Practices: Set the ASM/ME Backup Document location to a folder share that is reachable by all nodes at all times. It is recommended not to use a cluster disk as the passive nodes will not be aware of the

Smart Copies until the nodes failover.

7.1

Protecting clustered SQL Server databases

Protecting clustered SQL databases is similar to protecting non-clustered databases. All the protection capabilities of ASM/ME in a non-clustered environment are supported in a clustered environment. Please

refer to the Creating SQL Server Database Smart Copies section in this document for instructions on how

to create Smart Copies of SQL Server databases.

7.2

Recovering SQL Server Data in a failover cluster

Depending on the ASM/ME restore method, recovering SQL Server data in a failover cluster can involve additional steps needed to complete recovery operations on the cluster. This section will describe each

ASM/ME restore method and the steps needed to complete SQL data recovery.

29 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

The same ASM/ME restore options are available in failover clusters. Any or all of these options can be used

to recover SQL Server data depending on the recovery method needed. Refer to the Restoring SQL Server

Databases with Smart Copies section for more information on the following options.

 Mount

 Restore selected database

 Restore All

 Restore as New

7.2.1

Restore All and Restore selected database

In a failover cluster environment, the simplest recovery options are the Restore All or Restore selected database . These recovery options will perform an “in-place” restore of a SQL Server database from a

Smart Copy. The Restore All option is the fastest recovery method where the original database volumes are rolled back to the point-in-time of the Smart Copy. The Restore selected database performs a data movement operation that can take longer depending on the size of the database files being restored.

Both of these restore methods are fully automated and do not require any additional steps by administrators.

Note: Occasionally during a Smart Copy restore operation on a cluster a “Failed to log off” message will appear trying to log off of a cluster volume as shown in Figure 16. This may be due to a cluster service unable to log off the original volume. To continue the Smart Copy restore process make certain the volume in question should be restored and continue by choosing the “ Ignore ” button.

Figure 16 Failed to log off message

7.2.2

Restore as New and Mount

The Restore as New and Mount options are useful to recover object level data without a complete restore of a SQL database. These recovery methods import the Smart Copy onto the cluster nodes but do not add the disks as cluster resources. Administrators will need to perform additional steps to add the cluster resources and complete the restore process. This section describes these additional steps needed to recover SQL data on failover clusters.

30 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

7.2.3

Restore as New – Drive Letter Option

The Restore as New process will import the Smart Copy on all nodes and automatically connect to the

Smart Copy using the iSCSI initiator.

1.

Use ASM/ME

Restore as New

and choose the Assign the following drive letter option.

2.

Assign drive letters to the Smart Copy volumes – Next

3.

Add new database name if necessary – Restore a.

This will connect to the Smart Copy using the iSCSI initiators on all nodes in the cluster. The following manual steps are needed to complete the process.

Add the new disks to the cluster and assign resource dependencies. Depending on what version of

Windows Server you are running these steps may vary slightly. This example will use a Windows Server

2008 Failover Cluster.

4.

Add the restored Smart Copy set as new disks in the cluster, Figure 17. a.

If an error is generated stating “ No disks suitable for cluster disks were found.

” check to be sure the Smart Copy is connected in the iSCSI initiator on all cluster nodes as shown in Figure

18.

Figure 17 Add Cluster Disk

31 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 18 Smart Copy Connected in Initiator

5.

Add the same set of disks to the SQL Server cluster service, Figure 19.

Figure 19 SQL Server – Add Storage

6.

Add the same set of disks to the SQL Server dependency list, Figure 20.

32 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 20 Add SQL Server Dependencies

7.

Attach the database to the SQL instance using the SQL Server Management Studio or an Attach command as in Figure 21.

Note: The Create Database command must be used if the file stream feature is enabled for the instance.

33 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 21 Attach Database Options

It is important to properly clean up the environment when finished with the Smart Copy Set. When finished with the mounted Smart Copy, follow these steps to detach and dismount the Smart Copy set from the cluster.

1.

Detach the database using ASM/ME

2.

Remove the Smart Copy disk resources from the SQL Server service dependency list

3.

Delete the Smart Copy disks from the cluster

4.

Use ASM/ME to logoff the Smart Copy set

7.2.4

Restore All as New – Mount Point Option

ASM/ME also supports using mount points with Restore All as New. The mount point option will require a non-clustered shared disk to create the mount point folders on.

1.

Use ASM/ME Restore All as New and choose the Mount in the following empty NTFS folder option.

2.

Add the location of the mount point folders on the non-clustered shared disk – Next

3.

Add new database name if necessary – Restore a.

This will connect to the Smart Copy using the iSCSI initiators on all nodes in the cluster.

To complete the recovery process the hosting (non-clustered) volume and the Smart Copy set (mount points) must be added to the cluster and specified as disk resources. Use the following steps to complete this process.

34 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

4.

Add the hosting volume and the restored Smart Copy set mount points as new disks in the cluster. a.

Be sure to have all the disks associated with host volume and mount points in the Add Disks to a Cluster window, Figure 22.

Figure 22 Add Hosting Volume and Mount Points to Cluster

Follow the same steps as above to add the disks as resources of the SQL Server service and attach the database. Use the same cleanup process as above to detach the database and log off the Smart Copy set.

35 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

8

Advanced Operations with SQL Server Databases

Auto-Snapshot Manager / Microsoft Edition, ASM/ME, has advanced operations and management capabilities that offer database administrator’s additional functionality beyond normal day-to-day protection. These operations may require some manual operations that are not automated by ASM/ME or a higher understanding of SQL Server techniques.

For advanced techniques using earlier versions of ASM/ME, please see the technical report:

SQL Server

Database Protection Using Auto-Snapshot Manager / Microsoft Edition: Advanced Operations

.

Advanced operations discussed in this document include:

 Restoring SQL Server databases to new servers using transportable Smart Copies

 SQL Server Database Distribution Using Template Databases

 SQL Server Database Replication Using Smart Copies

Data mining capabilities Using Smart Copy Replicas

Restoring SQL Server Databases with Smart Copy Replicas

 Off-Host Backup and Recovery

This section should only be read after fully understanding basic ASM/ME operations with SQL Server databases.

8.1

SQL Server Database Restore to a New Server

ASM/ME 4.0 introduces a new option for Smart Copy recovery. The Import on Another Host smart copy option (shown in figure 24) is a new valuable option to enable SQL database portability. The import option will allow an administrator to import a smart copy backup document from one managed host onto another managed host in the HIT group and perform a Restore as New operation of that Smart Copy onto the new host. This option is valuable to admins as they can easily use these imported copies on test and development systems or to off load operations such as reporting or data mining.

Important things to consider:

 The SQL database version must be compatible with the SQL instance you plan to import it onto.

 Use an ASM/ME backup document structure according to best practices recommendations. Refer

to the section on ASM/ME Backup Documents .

 When a Smart Copy is imported onto another host it will not be available on the original host where it was created. In ASM/ME v4.0 this operation will show a dialogue box requesting to Add or

Modify Group Info . Choose Cancel to exit this window and fail the operation. This handling will be improved in future releases of ASM/ME.

For this procedure we will use the following Smart Copy options in ASM/ME:

 Import on Another Host

 Restore as New

36 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

The following steps describe how to use this option:

1.

Prepare the new host to access the PS Series group that is hosting the Smart Copies, including configuring the correct CHAP credentials.

Note: To Mount or access a Smart Copy from a remote system the CHAP credentials should be set for

Global Smart Copy access on each SQL Server system in the ASM/ME Settings.

2.

In the PS Series Group Manager, add the new CHAP Access Control Record for the volumes that make up the database, and set the ACL for Snapshots Only (Figure 23).

Figure 23 CHAP – Snapshot Access Control

3.

Refer to the images in Figure 24. On the host that created the database Smart Copies, use the

Import on Another Host option to copy a Smart Copy backup document from one host into the

Smart Copy list of another. Next select the host you want to import the Smart Copy to.

37 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 24 Importing a Smart Copy from one host to another

4.

Once the Smart Copy backup document is imported, it will show up in the Smart Copies list on the new host. Now run ASM/ME on the new host, and select the Restore as New option for the database Smart Copy you want to restore on the new server.

The Restore as New process will look for the SQL Server instance that is listed in the backup document.

This process will eventually time out when it doesn’t recognize the original instance from the Smart Copy.

In the field labeled ‘Database server to use’, enter the SQL Server instance name you want to restore the

Smart Copy to, Figure 25.

Figure 25 Enter the New Database Server to use

38 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Once the database is fully restored it can be used for other purposes, such as test and development or offloading operations such as reporting or data mining. This process can be applied to SQL database servers throughout the datacenter.

8.2

SQL Server Database Distribution using Template Databases

A feature added with PS Series array firmware v5.x is template volumes and thin clones. This allows PS

Series volumes to be designated as template volumes where a standard volume can be converted into a template volume that holds a read-only locked configuration of the volume data. The template volume can then be used to create highly space efficient and distributable thin clones that reference the read-only configuration data of the template volume, Figure 26. Thin clones have an advantage over snapshots as they do not consume snapshot reserve and only new writes are applied to the storage pool. For more information on template volumes and thin-clones see the latest

PS Series Firmware Group Administration

Guide

.

Figure 26 Thin Clone Distribution Example

In a SQL Server world this can be useful to quickly distribute large numbers of database copies to test and dev teams without costing valuable storage space. In a test and development environment, this would mean any new builds or tests on a thin-clone database will take up very minimal storage space and if a build doesn’t work or breaks, the database can be easily reverted back to the state of the template database.

Figure 27 shows the process Flow to create database Thin Clones using ASM/ME and the PS Series Group

Manager.

39 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Create DB

Clone Smart

Copy

Convert to

Template

Volumes

Verify iSCSI

Initiator Login

Restore DB

Clone as New

(Set Read-Only Flag)

Locate Name of Clone

Volumes

Refresh

Services on

SQL Instance

Figure 27 Figure 27: Thin Clone Database Process Flow

Create DB

Copies Using

Thin Clones

8.3

Step by Step Template Database Creation

First prepare the database copy for template volumes.

1.

Use ASM/ME to create a Clone Smart Copy of the SQL database being used

2.

Restore the Clone Smart Copy using the Restore All as New method a.

Be sure to check the “Make database READ-ONLY after attach” check box

The database should show up as a read-only copy of the database in SQL Server Management Studio,

Figure 28.

Figure 28 Read-Only Database in Management Studio

Now the database volumes can be converted to template volumes using the PS Series Group Manager

GUI.

40 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

1.

In SQL Server Management Studio, set the new read only database offline prior to converting the clone to a template volume.

2.

Select the Smart Copy used for the read-only copy of the database and locate the names of the volumes that were created in the properties window of ASM/ME, Figure 29.

3.

Log into the PS Series Group Manager and locate the Smart Copy Clones in the Group Manager

Volumes view. Select the Smart Copy Clones and using the Activities pane of Group Manager, select the Convert to template option circled in Figure 30. a.

Repeat this process for each clone volume in the database Smart Copy.

4.

The volumes will be set offline and converted into template volumes. Lastly, set the template volumes online using the Activities pane in Group Manger.

Figure 29 PS Series Volume Names of Smart Copy

41 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 30 Locate Volumes Used for Template Volumes

Now that the volumes have been converted to template volumes in the PS Series Group Manager, services will need to be refreshed on SQL Server host to recognize the template database. Do not restart these services .

1.

First refresh the Microsoft iSCSI initiator – Targets list and make sure the template volumes are logged in (connected). Log into the template volumes if necessary.

2.

Next refresh the SQL Server instance.

3.

Bring the database online in the SQL Server instance. a.

If the database fails to online, refresh the SQL instance again.

4.

Lastly, refresh the host in Auto-Snapshot Manager to recognize the changes.

Use ASM/ME to create Thin Clones of the created template database, Figure 31, and follow the steps

above in SQL Server Database Restore to a New Server section to distribute Thin Clone copies for space

efficient test and development environments.

Note: The Mount command is the only option available for thin clones from ASM/ME. Once mounted, the thin clone can be attached manually to the SQL instance.

42 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 31 Create Thin Clone Using ASM/ME

8.4

SQL Server Database Replication using Smart Copies

Replica Smart Copies can be useful for restoring SQL Server databases in the event of a primary site disaster. They can also be used to offload data mining and backup operations from the primary site to the remote site. A remote site refers to a host connecting to the replication partner or remote PS Series group. This section describes these options in more detail.

43 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

The Smart Copy restore options for replicas include:

 Mount as read-only – This operation imports the replica set (and pauses all incoming replication) and mounts the selected replica (not the entire replica set) as a read only volume so that it can be used as backup if necessary. When finished, the replica must be un-mounted which demotes the replica set and allows replication to continue.

 Restore selected database – This option will selectively restore a database from the replica smart copy. This option is only available to the local SQL Server instance.

 Clone and Restore as New – This option will create a clone of the replica smart copy, mount and attach the cloned database to the SQL instance you choose. This option is useful if the intent is to use the database to offload operations that require a running copy of the database such as offloading reporting or test operations at the DR site.

 Clone – This option will create a clone of the selected replica. Once the clone is created, this option offers the ability to mount the replica clone without disrupting replication processes on the original database volumes.

To perform these operations, ASM/ME must be running in the SQL instance at the remote site and have access to the ASM/ME backup documents. See the Best Practices

section on ASM/ME Backup

Documents for information on how to secure and manage these documents.

8.5

Data Mining or Offloading Operations with Smart Copy Replicas

Offloading operations using database replica Smart Copies is easy with ASM/ME and can be a useful option if the infrastructure exists in the data center. Using a remote site for operations such as data mining or reporting operations can be done using Smart Copy replicas by using the Mount as read-only, Clone, or Clone and Restore as New options from the restore options. It’s important to note that the Mount as read-only operation will pause inbound replication on the volumes that make up the database smart copy.

The Mount as read-only option promotes the replica set and mounts the selected replica Smart Copy to the host of your choice. The mounted replica is read-only and available for backup and mining operations. This operation will pause replication on the replica set until it is un-mounted.

The mounted smart copy replica will be designated with an “i” in the smart copy icon. To un-mount and resume replication, right-click the replica Smart Copy in ASM/ME and choose Unmount and Resume

Replication as shown in Figure 32.

44 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Figure 32 Unmount and Resume Replication

The Clone and Clone and Restore as New options both create a clone of the replica smart copy and list the clone in the ASM/ME Smart Copies area as non-VSS type smart copies. Replica clones can be used as replica copies without pausing replication between the PS Series groups.

The Clone option will only create the clone and place the clone as an option in the Smart Copies list. An additional operation is required to mount the clone on the host chosen.

The Clone and Restore as New will create the clone as well as mount and attach the clone as a new database in the SQL instance of choice.

Note: ASM/ME creates a clone of each volume that makes up the replica smart copy. Be sure to mount all cloned database volumes when using the Clone and Mount options.

Like a mounted smart copy, an “i” (meaning imported) will designate the mounted clone. To un-mount the clone, right-click in ASM/ME and choose Unmount and Logoff… Optionally delete the mounted clone if changes have taken place on the clone copy.

45 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

8.6

SQL Server Database Disaster Recovery with Smart Copy Replicas

The recommended method for restoring SQL Server Databases from Smart Copy replicas is to use the

Clone and Restore All as New option. This creates a clone of the Smart Copy replica, mounts the clone to the host you choose, and restores the database online to the host. This process looks for the server name in the backup document and times out. Add the new server name to the database server dialog box and continue with the restore process.

Once the database is online, you can put it into production use and have it take over the production database tasks. The Clone and Restore All as New option does not promote the entire replica set and does not affect other replication processes. The Smart Copy replica clone looks like a regular volume in the PS Series Group Manager GUI.

If the cloned replica was not used for production purposes you can clean up the replica smart copy using

ASM/ME. Use the Detach Database option within ASM/ME to detach the database from SQL Server and log off using the same steps as earlier in the previous Data Mining section. You can also choose to delete or detach the database from the SQL Server and disconnect the clone volume from the host using the

Microsoft iSCSI Initiator. Then, delete the clone from the PS Series Group Manager GUI.

If the clone replica is used for production purposes you may want to replicate the volumes back to the primary site if/when it is available. To do this you will have to configure replication on the replica clone(s) and replicate these back to the primary site so that the changes made at the secondary site will be available to the primary site.

Note: There is no support for the PS Series failback capability with Clone and Restore as New. Once production has been started on the remote group, the only way to propagate changes back to the primary group is by replicating the clone volumes to the primary group when it is back up and operational.

8.7

Disaster Recovery with Failback Capabilities

PS Series replication has the ability to failback only the changes from a promoted replica set back to the primary site once the primary site is running again. This saves time in recovering the primary site when the secondary site has been running production for some time. For more information on PS Series replication and Failback features please refer to the PS Series Group Administrator Guide.

To enable the failback capabilities of PS Series replication with ASM/ME, the replica restore procedure is completely manual. ASM/ME is used to create the Smart Copy replicas but manual recovery methods must be used to preserve the failback capabilities. To utilize failback in the event of a disaster follow the steps below to recover SQL database replicas.

1.

Using the PS Series group manager, locate the replica sets on the PS Series group at the secondary or DR site. Be sure to locate all the replica sets for the volumes that make up the SQL database.

46 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

2.

Use the Promote to Volume option for the database replica sets. This will pause inbound replication on the database volumes. Optionally add access control to the promoted volumes from the hosts that will mount the volumes to restore the database. (This step can also be done at a later time)

3.

Attach the database volumes to the SQL instance. Access control will need to be granted to the volumes if not done already.

The SQL database should now be up and running in the instance at the secondary site. Depending on how long the secondary site is running, minimal or significant changes may have taken place on the DB while it’s running in the secondary site. When ready, the database volumes can be failed back to the primary site.

Note: The failback process will need to take the volumes offline prior to failing back to the primary site.

Also to utilize failback the data primary site must be intact, failback will not work if there was a total disaster at the primary site and the primary data and storage was destroyed.

8.8

Off-Host Backup and Recovery

Auto-Snapshot Manager / Microsoft Edition is a valuable tool for maintaining point in time copies of application data that can be recovered easily and quickly but it is not positioned as a long term data retention backup solution. Therefore it is best practice to incorporate a backup and recovery solution for long term data retention purposes.

The EqualLogic Host Integration Tools for Windows is bundled with the PS Series VSS provider. The VSS provider is fully compatible with third-party backup applications for off-host backup operations, Figure 33.

The off-host backup operation incorporates PS Series snapshots and a dedicated backup server running

3rd party software that initiates the backup operation on the application server. Once the snapshot copy is created, the backup server mounts the copy onto the media server and in turn, backs the snapshot up to disk or tape. This process allows the application server to continue application operations while the snapshot is backed up by a backup server thus offloading any additional processing from the production server. This may safely extend the backup window.

47 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

SQL Servers

Figure 33 Off-Host Backup Flow

In order for this process to work correctly, the backup software must support VSS backups for the application and the PS Series VSS Provider Service must be installed on the backup server as well as the application server for proper communication.

Note: Be sure to verify that any backup schedules set from the 3 rd party vendor software do not collide with schedules set from Auto-Snapshot Manager Microsoft Edition.

An advantage of using snapshots for long term backup and recovery operations is that they can provide a stable copy of data for copying to backup media. Also, snapshots provide a space-efficient way of backing up data, compared to clones or full database backups.

48 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

9

Summary

Auto-Snapshot Manager/Microsoft Edition (ASM/ME) can substantially increase SQL Server data availability by using PS Series array protection technologies. Snapshot, Clone, and Replica Smart Copies all play a vital role in robust SQL Server protection scenarios for on-demand data recovery and SQL Server database restores, as well as providing instant point-in-time copies for scalable distribution of SQL data.

Although using ASM/ME can increase SQL Server data protection and availability, it is not considered an alternative to long-term backup methods. ASM/ME and Smart Copies should be used in conjunction with a normal backup schedule for a higher level of data protection and shorter database recovery times.

By using ASM/ME with regular backup methods, you can ensure your SQL Server, Exchange Server, Hyper-

V, and NTFS data is protected and available at all times.

49 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

A

Command line options

If you have existing scripts for running backups or performing other background operations, you can also schedule the creation of smart copy sets by adding an ASM/ME command to the script.

Note: For a full set of PowerShell commands and scripting options see the PowerShell Tools User’s Guide and Quick Reference Guide on the Dell EqualLogic Host Integration Tools for Microsoft download page on the EqualLogic support site. https://eqlsupport.dell.com/support/download.aspx?id=3199

A.1

Scripting ASM/ME v3.1 and Later

ASM/ME includes all the functionality of the GUI into the command line interface. Additionally the GUI has included options to automate script creation by allowing users to run through Smart Copy processes in the GUI and outputting the commands needed to perform these operations via command line.

To initiate the script creation process highlight the object you want to work with. Either right click or use the Actions pane to the right to “Generate [command type] Command” as in Figure 34.

Generate

[command type]

Command

Figure 34 Generate Command

50 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

This will run through the process of creating a Smart Copy Set and at the end instead of creating the Smart

Copy, generate the script used as in Figure 35. This command can then be copied and used to create the

Smart Copy in a script or batch file.

Figure 35 Generated Command

Scripts like this can be created for other Smart Copy operations and used accordingly. For a detailed description of script commands and sample usage, see the Host Integration Tools User Guide.

51 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

Technical Support and Customer Service

Dell support service is available to answer your questions about PS Series SAN arrays.

Contacting Dell

1.

If you have an Express Service Code, have it ready.

The code helps the Dell automated support telephone system direct your call more efficiently.

2.

If you are a customer in the United States or Canada in need of technical support, call 1-800-945-3355. If not, go to Step 3.

3.

Visit https://eqlsupport.dell.com/secure/login.aspx

4.

Log in, or click “Create Account” to request a new support account.

5.

At the top right, click “Contact Us,” and call the phone number or select the link for the type of support you need.

52 TR1081 | Microsoft SQL Server Database Protection Using EqualLogic Auto-Snapshot Manager / Microsoft Edition

advertisement

Related manuals

advertisement

Table of contents