MIRRORING: START TO FINISH. Ryan Adams Blog - http://ryanjadams.com Twitter - @ryanjadams

Similar documents
Manage Your Shop with Policy Based Management & Central Management Server

Appendix A Core Concepts in SQL Server High Availability and Replication

SQL Server AlwaysOn. Michal Tinthofer 11. Praha What to avoid and how to optimize, deploy and operate.

SQL Server 2012/2014 AlwaysOn Availability Group

Microsoft SQL Database Administrator Certification

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

SQL Server Mirroring. Introduction. Setting up the databases for Mirroring

Database Mirroring: High Availability (HA) and Disaster Recovery (DR) Technology

Designing Database Solutions for Microsoft SQL Server 2012 MOC 20465

SQL Server for Database Administrators Course Syllabus

Best Practices for Upgrading to SQL Server 2012

SQL Server AlwaysOn (HADRON)

MS SQL Server 2014 New Features and Database Administration

Microsoft SQL Server 2012 Administration

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

Module 07. Log Shipping

Advanced HA and DR.

Maintaining a Microsoft SQL Server 2008 Database

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Author: Ryan J Adams. Overview. Policy Based Management. Terminology

Administering Microsoft SQL Server 2012 Databases

Course Syllabus. Maintaining a Microsoft SQL Server 2005 Database. At Course Completion

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Extending Your Availability Group for Disaster Recovery

Module 14: Scalability and High Availability

Exam Number/Code : Exam Name: Name: PRO:MS SQL Serv. 08,Design,Optimize, and Maintain DB Admin Solu. Version : Demo.

Real World Enterprise SQL Server Replication Implementations. Presented by Kun Lee

Mind Q Systems Private Limited

Designing and Deploying Messaging Solutions with Microsoft Exchange Server 2010 Service Pack B; 5 days, Instructor-led

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

Implementing and Managing Windows Server 2008 Clustering

Missed Recovery Techniques for SQL Server By Rudy Panigas

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

Implementing a Microsoft SQL Server 2005 Database

SQL Server Training Course Content

DB2 9 for LUW Advanced Database Recovery CL492; 4 days, Instructor-led

Designing, Optimizing and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008

Administering a Microsoft SQL Server 2000 Database

MS 20465: Designing Database Solutions for Microsoft SQL Server 2012

Designing a Data Solution with Microsoft SQL Server 2014

Designing a Data Solution with Microsoft SQL Server 2014

SQL Server 2008 Administration

Computer Visions Course Outline

Designing a Data Solution with Microsoft SQL Server

Course Syllabus. At Course Completion

MS Design, Optimize and Maintain Database for Microsoft SQL Server 2008

MS 20465C: Designing a Data Solution with Microsoft SQL Server

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

Course 20465: Designing a Data Solution with Microsoft SQL Server

Designing a Data Solution with Microsoft SQL Server

Course 20465C: Designing a Data Solution with Microsoft SQL Server

Beginning SQL Server Administration. Apress. Rob Walters Grant Fritchey

Contents. SnapComms Data Protection Recommendations

SQL Server AlwaysOn

Administering a Microsoft SQL Server 2000 Database

Expert Reference Series of White Papers. Unlock the Power of Microsoft SQL Server 2012

Course. Overview. Length: 5 Day(s) Published: English. IT Professionals. Level: Type: Method: Delivery. Enroll now (CAL)

6231A - Maintaining a Microsoft SQL Server 2008 Database

Floating on a Hybrid Cloud: SQL Server 2012 & Microsoft Azure. Timothy P. McAliley Microsoft Premier Field Engineer SQL Server

New hybrid cloud scenarios with SQL Server Matt Smith 6/4/2014

Deploy App Orchestration 2.6 for High Availability and Disaster Recovery

This article Includes:

Microsoft SharePoint 2010 on VMware Availability and Recovery Options. Microsoft SharePoint 2010 on VMware Availability and Recovery Options

Microsoft SQL Server 2012 Administration. Real-World Skills for MCSA Certification and Beyond (Exams , , and )

20465: Designing a Data Solution with Microsoft SQL Server

MCTS Microsoft SQL Server 2005 Implementation & Maintenance

WELKOM Cloud met Azure

SQM. Maintaining Microsoft SQL for Broadcast Engineers. Training Course Outline

Upon completion of the program, students are given a full support to take and pass Microsoft certification examinations.

XenDesktop 5 Database Sizing and Mirroring Best Practices

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

SQL Server 2016 New Features!

DocAve 6 High Availability

Designing Database Solutions for Microsoft SQL Server 2012

Administering a Microsoft SQL Server 2000 Database

Mission-Critical Availability

20465C: Designing a Data Solution with Microsoft SQL Server

EMC NetWorker Module for Microsoft for SQL VDI

SQL SERVER TRAINING CURRICULUM

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

Symantec NetBackup for Microsoft SQL Server Administrator's Guide

Database Mirroring & Snapshots SQL Server 2008

Course 20465C: Designing a Data Solution with Microsoft SQL Server

SQL Server on Azure An e2e Overview. Nosheen Syed Principal Group Program Manager Microsoft

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability

Course 2788A: Designing High Availability Database Solutions Using Microsoft SQL Server 2005

SQL Azure vs. SQL Server

Database Administrator Certificate Capstone Project Evaluation Checklist

Below are the some of the new features of SQL Server that has been discussed in this course

Availability Guide for Deploying SQL Server on VMware vsphere. August 2009

Exam : Upgrade: Transition Your MCITP SQL Server 2005 DBA to MCITP SQL Server Title : Version : Demo

W I S E. SQL Server 2012 Database Engine Technical Update WISE LTD.

SQL Server What s New? Christopher Speer. Technology Solution Specialist (SQL Server, BizTalk Server, Power BI, Azure) v-cspeer@microsoft.

Configure AlwaysOn Failover Cluster Instances (SQL Server) using InfoSphere Data Replication Change Data Capture (CDC) on Windows Server 2012

Transcription:

MIRRORING: START TO FINISH Ryan Adams Blog - http://ryanjadams.com Twitter - @ryanjadams

About Me http://www.ryanjadams.com @ryanjadams

Objectives Define Mirroring Describe how mirroring fits into HA and DR Terminology The Rules What s new? Demo How to configure mirroring Other Considerations Demo - Monitoring Mirroring

What is mirroring?

What is the difference between HA and DR? Which business requirement does mirroring solve?

What are my other HA/DR Options? Clustering HA only until server 2008 and SQL 2012 Transactional Replication HA & DR Peer to Peer Replication HA & DR Think Mesh topology or AD replication Log Shipping HA & DR Backups DR AlwaysOn FCI - DR AlwaysOn AG HA & DR

Mirroring was deprecated so why do I care to use it anymore? Was it deprecated starting in SQL 2012? Yes. Usually remains in product for 2 more major versions If SQL 2014 were the last version for mirroring when does it die? Extended support ends July 9 th, 2024 Are AlwaysOn Availability groups are the replacement? Yes. Only available in Enterprise Edition I can t afford Enterprise Edition so what do I do? Log Shipping My mirror is across untrusted domains or in separate, but trusted domains, does that matter when migrating to AGs? YES

Terminology

Principal Mirror Witness Endpoint Session State 5 states Mode 3 modes

Session States Synchronizing Synchronized Suspended Pending Failover Disconnected

Modes High Safety with Automatic Failover High Safety without Automatic Failover High Performance

The Rules

Rules You cannot mirror any system DBs High Performance requires Enterprise Edition Witness can be any edition including workgroup, web, and express Automatic failover requires a witness DB must be in full recovery mode You cannot mirror a DB that uses Filestream Maintenance plans do not support mirroring until SQL 2005 SP2 CU10 Avoid local system for SQL service account Database compatibility level must be greater than 90 (SQL 2005) Peer to Peer Replication cannot be used in conjunction with mirroring.

What s new for mirroring in SQL 2008 1 Log Stream Compression 2 3 4 Automatic Page Recovery Better use of log stream buffers Additional performance counters

What s new in SQL 2012 and 2014

How it Works

Synchronous Mode Principal Transaction Inserted in Log Transaction Read from Log Transaction Shipped to Mirror Mirror Transaction Written to Log Transaction Committed Acknowledgement Sent to Principal Principal Acknowledgement Received Transaction Committed

Asynchronous Mode Principal Mirror Transaction Inserted in Log Transaction Read from Log Transaction Committed Transaction Shipped to Mirror Transaction Written to Log Transaction Committed Acknowledgement Sent to Principal Principal Acknowledgement Received

Configuration Steps Restore DB and Log Backup on Mirror with no recovery Create Mirroring Endpoints Create Logins for SQL Service Account Grant Connect on Endpoints to Logins Set Principal Partner on Mirror Set Mirror Partner on Principal Set Failover Timeout

DEMO GUI T-SQL

Comparison Mirroring Log Shipping DB replicated to one other instance Transactions shipped real time Mirror DB not available for queries (Snapshot) Data is compressed over the wire Automatic page recovery DB replicated to many other instances Transactions shipped on a schedule Secondary DB available for queries Only compressed if log backups are compressed No page recovery

Other Considerations

Is Your Mirror Server Prepared? Logins SQLAgent Jobs SSIS Packages Linked Servers Database Level Options Change owner on mirror Set Trustworthy option on mirror Instance Level Options Enable CLR Database Mail Extended SPs like xp_cmdshell

Monitoring

Mirror Monitoring Where is the data stored msdb.dbo.dbm_monitor_data Performance Counter Root Location SQLServer:Database Mirroring MSSQL$InstanceName:Database Mirroring How to view the data Database Mirroring Monitor System Stored Procedures Sp_dbmmonitorresults Sp_dbmmonitorchangealert Sp_dbmmonitorhelpalert Sp_dbmmonitordropalert Perfmon

Demo

Summary Mirroring Defined Business Requirements Defined Terminology Defined Rules Defined Configuration Steps Monitoring

Resources Pro SQL Server 2008 Mirroring Robert Davis Twitter - @SQLSoldier Web - http://www.sqlsoldier.com/ Ken Simmons Twitter @KenSimmons Web CyberSQL.blogspot.com Ryan Adams Copy Logins Script http://www.ryanjadams.com/2010/09/automate-sql-logins-to-dr-site/ Slides and Code http://www.ryanjadams.com/presentations Ryan Adams Blog - http://ryanjadams.com Twitter - @ryanjadams QUESTIONS?