Book Image

Professional SQL Server High Availability and Disaster Recovery

By : Ahmad Osama
Book Image

Professional SQL Server High Availability and Disaster Recovery

By: Ahmad Osama

Overview of this book

Professional SQL Server High Availability and Disaster Recovery explains the high availability and disaster recovery technologies available in SQL Server: Replication, AlwaysOn, and Log Shipping. You’ll learn what they are, how to monitor them, and how to troubleshoot any related problems. You will be introduced to the availability groups of AlwaysOn and learn how to configure them to extend your database mirroring. Through this book, you will be able to explore the technical implementations of high availability and disaster recovery technologies that you can use when you create a highly available infrastructure, including hybrid topologies. Note that this course does not cover SQL Server Failover Cluster Installation with shared storage. By the end of the book, you’ll be equipped with all that you need to know to develop robust and high performance infrastructure.
Table of Contents (9 chapters)
Professional SQL Server High Availability and Disaster Recovery
Preface

Configuring Log Shipping


In this section, we'll learn to configure log shipping using SQL Server Management Studio. We'll be using the DPLPR, DPLDR, and DPLHA Hyper-V machines prepared in Lesson 4, AlwaysOn Availability Groups.

Note

Execute the C:\Code\Lesson05\10_Delete_AG_DPLAG.sql script to delete the DPLAG availability group. The script also deletes the Sales and Finance databases at DPLHA and DPLDR.

We'll log ship the Sales database from the primary instance, DPLPR, to the secondary instance, DPLHA.

Exercise 61: Configuring Log Shipping

To configure the log shipping setup, follow these steps:

  1. Connect to the VM DPLPR. Copy the C:\Code\Lesson06\CreateFolders.ps1 script to the C:\Scripts folder on DPLPR. Open a new PowerShell window on DPLPR and run the following command:

    C:\Scripts\CreateFolders.ps1

    The script creates a new Logshipshare directory in the C drive and shares it with read access to the DPL\Administrator user and a new directory, C:\DPLPRTlogs, at the secondary instance DPLHA. This...