Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to High Availability in SQL Server 2014

Similar presentations


Presentation on theme: "Introduction to High Availability in SQL Server 2014"— Presentation transcript:

1 Introduction to High Availability in SQL Server 2014
Module 6 Introduction to High Availability in SQL Server 2014

2 Module Overview Log Shipping 20465D
6: Introduction to High Availability in SQL Server 2014 Log Shipping Explain the key learning points and answer any questions that arise. Note that the following two modules describe AlwaysOn Availability Groups and AlwaysOn Failover Clusters in detail, so you do not need to provide in-depth coverage of these subjects at this point.

3 Lesson 1: High Availability Concepts and Options in SQL Server 2014
6: Introduction to High Availability in SQL Server 2014 Considerations for High Availability in a Private Cloud

4 Overview of High Availability
20465D Overview of High Availability 6: Introduction to High Availability in SQL Server 2014 High availability technologies help ensure the continuation of service provision in the event of an outage High availability plans should include: Hardware Windows operating system SQL Server instance Individual databases Explain the key learning points and answer any questions that arise.

5 Options for High Availability in SQL Server 2014
20465D Options for High Availability in SQL Server 2014 6: Introduction to High Availability in SQL Server 2014 Log Shipping Witness Failover Cluster Instance Passive Active Availability Group Windows Cluster Primary replica Active Secondary replica Database Mirroring Explain the key learning points and answer any questions that arise. Note that both AlwaysOn FCIs and AlwaysOn Availability Groups are described in greater detail in later modules, so you only need to provide a summary of these technologies here.

6 Planning High Availability
20465D Planning High Availability 6: Introduction to High Availability in SQL Server 2014 Key considerations Service level agreements Cost Resource utilization Choosing a SQL Server high availability solution Unit of failover Relative cost Automatic failover Automatic client redirection Maximum number of replicas Readable replicas SQL Server edition

7 Considerations for High Availability in a Private Cloud
6: Introduction to High Availability in SQL Server 2014 Host Clustering Cluster physical Hyper-V hosts Live Migration Online transfer of VMs between hosts Shared Cluster Volumes Store VHDs for multiple VMs on cluster LUNs Guest Clusters Cluster VMs within Hyper-V hosts Shared storage for VMs iSCSI Shared VHDs Virtual Fibre Channel Host Cluster Guest Cluster Cluster Shared Volume Live Migration

8 Demonstration: Initiating Failover
Lesson 2: Log Shipping 6: Introduction to High Availability in SQL Server 2014 Demonstration: Initiating Failover

9 Introduction to Log Shipping
6: Introduction to High Availability in SQL Server 2014 Log shipping is a three-phase process: Backup up log on primary server Copy log to secondary server Restore log on secondary server Use log shipping in a variety of scenarios Configure read-only secondary servers to share workloads Manually failover to secondary server

10 SQL Server Agent and Log Shipping
6: Introduction to High Availability in SQL Server 2014 LSBackup_databasename This job backs up the primary database LSCopy_primaryinstancename_databasename This job copies transaction log backups from the primary server to the secondary server LSRestore_primaryinstancename_databasename This job restores log files on the secondary server LSAlert_servername This job monitors the other three jobs and raises alerts if they fail to run

11 Considerations for Using Log Shipping
6: Introduction to High Availability in SQL Server 2014 Using a secondary server for read-only access Degree of latency Size of backups Retention period for log backups Different versions of SQL Server Monitoring Using a monitor server Without a monitor server Failover

12 Pre-Installation Tasks
20465D Pre-Installation Tasks 6: Introduction to High Availability in SQL Server 2014 Pre-installation tasks include: Create and configure share to store log backups Decide whether or not to compress backups Check the recovery model on the primary database Configure security on the secondary server Create backup on primary server and restore it on secondary server

13 Demonstration: Configuring Log Shipping
6: Introduction to High Availability in SQL Server 2014 In this demonstration, you will see how to: Configure Log Shipping Inspect the Log Shipping Configuration Test Access to Log Shipping Servers Preparation Steps Start the 20465C-MIA-DC and 20465C-MIA-SQL virtual machines. Demonstration Steps Configure Log Shipping Ensure that the 20465C-MIA-DC and 20465C-MIA-SQL virtual machines are running. Then log onto MIA-SQL as ADVENTUREWORKS\Student with the password Pa$$w0rd. In the D:\Demofiles\Mod06 folder, right-click Setup.cmd and click Run as administrator. When prompted, click Yes. Start SQL Server Management Studio and connect to MIA-SQL by using Windows authentication. In Object Explorer, expand Databases, right-click DemoDB, click Tasks, and then click Ship Transaction Logs. In the Database Properties window, on the Transaction Log Shipping page, click the Enable this as a primary database in a log shipping configuration check box. Click Backup Settings. In the Network path to backup folder field, type \\MIA- SQL\PrimaryBackupFolder. In the If the backup folder is located on the primary server, type a local path to the folder field, type D:\DemoFiles\Mod06\PrimaryBackupFolder. Click Schedule, in the New Job Schedule dialog box, under Daily frequency, in the Occurs every field, type 3, and then click OK. This configures the job to run every three minutes. In the Transaction Log Backup Settings window, click OK. In the Database Properties window, click Add. In the Secondary Database Settings window, click Connect, in the Connect to Server dialog box, in the Server name field, type MIA-SQL\SQL2, and then click Connect. On the Initialize Secondary Database tab, ensure that Yes, generate a full backup of the primary database and restore it into the secondary database is selected. (More notes on the next slide)

14 Failover is a manual process in log shipping Planned failover
Failover and Failback 6: Introduction to High Availability in SQL Server 2014 Failover is a manual process in log shipping Planned failover Useful for performing testing and maintenance Usually no data loss Unplanned failover Enables continuity of data access in the event of failure of access to the primary database May involve some data loss Test failover after implementing log shipping

15 Demonstration: Initiating Failover
6: Introduction to High Availability in SQL Server 2014 In this demonstration, you will see how to: Initiate Manual Failover Preparation Steps Before you perform this demonstration, you should complete the earlier demonstration Configuring Log Shipping. Demonstration Steps Initiate Manual Failover Ensure that you have completed the previous demonstration in this module. In Object Explorer, click MIA-SQL, and then open BackupLog.sql in the D:\Demofiles\Mod06 folder. In SQL Server Management Studio, in the BackupLog.sql query window, below the comment Backup the DemoDB log on the primary server, highlight the Transact-SQL statement, and then click Execute. In Windows Explorer, in the D:\Demofiles\Mod06\PrimaryBackupFolder folder, right-click FinalBackup.trn, and then click Copy. Browse to D:\Demofiles\Mod06\SecondaryRestoreFolder, right-click in the folder, and then click Paste. In SQL Server Management Studio, in Object Explorer, click MIA-SQL\SQL2. Then open RestoreLog.sql in the D:\Demofiles\Mod06 folder. In Object Explorer, under MIA-SQL\SQL2, under SQL Server Agent, right-click LSCopy_MIA- SQL_DemoDB, and then click Start Job at Step. In the Start Jobs - MIA-SQL\SQL2 dialog box, wait for the steps to complete, and then click Close. Repeat steps 6 and 7 to run the LSRestore_MIA-SQL_DemoDB job. In SQL Server Management Studio, in the RestoreLog.sql query window, under the comment Restore the final log backup, highlight the Transact-SQL statement, and then click Execute. Under the comment Recover the database, highlight the Transact-SQL statement, and then click Execute. In Object Explorer, under MIA-SQL, right-click DemoDB, and then click Refresh. Note that the DemoDB database is now in a Restoring state. (More notes on the next slide)

16 Lab: Using Log Shipping
20465D Lab: Using Log Shipping 6: Introduction to High Availability in SQL Server 2014 Exercise 3: Failover to the Secondary Database Exercise 1: Configuring Log Shipping To meet the requirements for high availability of the Products database, you will configure log shipping. Exercise 2: Testing the Log Shipping Configuration Having configured log shipping for the Products database, you will check the log shipping configuration and test access to the database of the primary and secondary servers. Exercise 3: Failover to the Secondary Database Having configured log shipping and tested access to the primary and secondary databases, you will now test failover. Logon Information Virtual Machine: 20465C-MIA-SQL User Name: ADVENTUREWORKS\Student Password: Pa$$w0rd Estimated Time: 60 minutes

17 20465D Lab Scenario 6: Introduction to High Availability in SQL Server 2014 A branch office at Adventure Works keeps a copy of the Products database on an instance of SQL Server The manager wants to ensure that, if the Products database becomes unavailable for any reason, users will be able to access it again with minimal delay. The branch office does not have a WFSC available. For this reason, and because there no requirement for uninterrupted service, you have decided to implement log shipping to keep the Products database highly available.

18 20465D Lab Review 6: Introduction to High Availability in SQL Server 2014 If you wanted to fail back to the original primary server, what would you need to do?

19 Module Review and Takeaways
6: Introduction to High Availability in SQL Server 2014 Review Question(s) Review Question(s) Question In what scenarios might an organization choose log shipping as a high availability solution? Answer Answers will vary, depending on students’ experiences.


Download ppt "Introduction to High Availability in SQL Server 2014"

Similar presentations


Ads by Google