DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.

Slides:



Advertisements
Similar presentations
Vineet Rao Lead Program Manager Microsoft Corporation SESSION CODE: DAT207.
Advertisements

SQL Server Disaster Recovery Chris Shaw Sr. SQL Server DBA, Xtivia Inc.
SharePoint 2013 & SQL Server 2012 Availability Groups The Rough Guide.
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
1EMC CONFIDENTIAL—INTERNAL USE ONLY Overview of SQL Server 2012 High Availability and Disaster Recovery (HADR) Wei Fan Technical Partner Management – Microsoft.
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
SQL Server Data Protection and High Availability Anil Desai.
Virtual techdays INDIA │ September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
National Manager Database Services
Presented by Joseph Galvan & Stacy Kemp BACKUPS.  Using database backups, a database administrator (DBA’s) can restore from the last backup or to a specific.
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
Gopal Ashok Program Manager Microsoft Corp Session Code: DAT 312.
IBM TotalStorage ® IBM logo must not be moved, added to, or altered in any way. © 2007 IBM Corporation Break through with IBM TotalStorage Business Continuity.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
Implementing Database Snapshot & Database Mirroring in SQL Server 2005 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft.
High-Availability Methods Lesson 25. Skills Matrix.
Implementing Multi-Site Clusters April Trần Văn Huệ Nhất Nghệ CPLS.
It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in It is a High Availability as well as Disaster recovery.
15 Copyright © 2005, Oracle. All rights reserved. Performing Database Backups.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
DB-2: OpenEdge® Replication: How to get Home in Time … Brian Bowman Sr. Solutions Engineer Sandy Caiado Sr. Solutions Engineer.
Rajib Kundu Agenda Definitions Failover Cluster Database Snapshots Log shipping Database Mirroring.
Reliability and Security in Database Servers By Samuel Njoroge.
Computer Emergency Notification System (CENS)
1 Data Guard. 2 Data Guard Reasons for Deployment  Site Failures  Power failure  Air conditioning failure  Flooding  Fire  Storm damage  Hurricane.
Module 5: Upgrading to SQL Server 7.0. Overview Planning an Upgrade Preparing to Upgrade Verifying the Upgrade Setting a Compatibility Level.
Overview of high availability in Microsoft SQL Server Szymon Wójcik.
High Availability in DB2 Nishant Sinha
Oracle DBAs Deploying Highly Available SQL Server Systems
Enhancing Scalability and Availability of the Microsoft Application Platform Damir Bersinic Ruth Morton IT Pro Advisor Microsoft Canada
Backing Up and Restoring Databases by Using the SQL Server 2000.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Data Disaster Recovery Planning Greg Fibiger 1/7/2016.
Virtual Machine Movement and Hyper-V Replica
SQL Server 2012: AlwaysOn HA and DR Design Patterns, and Lessons Learned from Early Customer Deployments Sanjay Mishra SQLCAT.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Windows Server Failover Clustering with SQL Server.
What HADR Option(s) Are Right For You?. Where’s The AlwaysOn?
SQL Server High Availability Introduction to SQL Server high availability solutions.
All the things you need to know before setting up AlwaysOn Michael Steineke SQL & BI Solution Lead Enterprise Architect Concurrency, Inc.
Windows Server Failover Clustering (WSFC) with SQL Server.
AlwaysOn In SQL Server 2012 Fadi Abdulwahab – SharePoint Administrator - 4/2013
Are You High? Can You Recover? Robert Douglas SQL Saturday #468, Sydney 27 th February 2016.
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
Database Mirroring with SQL Server
Determining BC/DR Methods
ALWAYSON AVAILABILITY GROUPS
Navigating the options for Data Redundancy
Disaster Recovery Where to Begin
AlwaysOn Mirroring, Clustering
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Always on HA SQL Server Always ON feature is the new comprehensive high availability and disaster recovery solution which increases application availability.
AlwaysOn Availability Groups 101
SQL Server High Availability Amit Vaid.
Safety of information systems Fault-tolerant systems
Database Mirroring The Basics
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Performing Database Recovery
Distributed Availability Groups
04 | Always On High Availability
Designing Database Solutions for SQL Server
Presentation transcript:

DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two or three servers depending upon the mode in which mirroring is configured.  This is among the best Disaster Recovery techniques providing database availability and automatic failover mechanisms.

Mirroring Terminology:  Principal  Mirror  Mirrored Pair  Witness  Quorum  End Point Endpoint is the method by which the Principal communicates with the Mirror. The mirror listens on a port defined in the endpoint. The default is Each database mirror pair listens on its own unique port.  Select * from sys.database_mirroring_endpoints (gives the list of Mirrored End points)

Database mirroring operating modes:  High Availability Mode: Provides synchronous data transfer between principal and Mirror. Provides automatic failover capability with the help of witness server. Performance impacted when Principle and Mirror servers are placed at a large distance.  High Safety Mode: Data is synchronous. Does not provide automatic failover capability(No witness server)  High Performance Mode: Data is not in sync and no automatic failover capability.

Prerequisites for Database Mirroring  Both the principal and mirror servers should be running the same edition of Microsoft SQL Server The partners require either SQL Server 2005 Standard Edition or SQL Server 2005 Enterprise Edition or SQL server 2005 Developer Edition.  SQL 2005 SP1 or later version is required for Mirroring.  The principal database must be in the FULL recovery model.  Verify that the mirror server has enough disk space for the mirror database  All of the server instances in a mirroring session should use the same master code page and collation.  The mirror database must have the same name as the principal database  The mirror database must be initialized from a restore of the principal database with NORECOVERY, followed by restores in sequence of principal transaction log backups. Prior to configuring mirroring ensure that at least 1 transaction log is restored in addition to full backup with NORECOVERY mode. First take full backup and one Transaction log backup from Principal server and restore it on Mirror server with NO Recovery Option. ************* We’ll Do Practical's ******************

How can I bring mirror database online after principal server is down ? First thing you will look into is about the mode in which mirroring is configured. We will see all the Possible options. Safety FULL with Witness(High Availability): If mirroring is configured in High Availability mode (Full safety) then we don't need to worry about failover as the mirror server will form a quorum with witness and will initiate an automatic failover. The safety level can be set using the below command, ALTER DATABASE dbname SET SAFETY FULL ALTER DATABASE dbname SET SAFETY OFF Safety FULL without Witness: This scenario provides high safety, but automatic failover is not allowed. This mode is called as High Protection mode. In the event of failure of the principal, the database service becomes unavailable. You need manual intervention to make the database service available. You must break the mirroring session and then recover the mirror database. For example, prior to the failure, Server_A and Server_B acted as principal and mirror respectively. Server_A fails. You need to execute the following on Server_B to make the database service available: ALTER DATABASE dbname SET PARTNER OFF RESTORE DATABASE dbname WITH RECOVERY

Safety OFF (High performance) : In the event of failure of the principal, the database service becomes unavailable. You can perform a force service to make the database service available on the mirror. However, since the safety level is OFF, it is possible that there were transactions that didn’t make it to the mirror at the time of the failure of the principal. These transactions will be lost. Therefore, manual failover with safety OFF involves acknowledging the possibility of data loss. For example, prior to the failure, Server_A and Server_B acted as principal and mirror respectively. Server_A fails. You need to execute the following on Server_B to make the database service available: ALTER DATABASE dbname SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Once the database on Server_A becomes operational, it automatically assumes the role of the mirror. However, the mirroring session remains SUSPENDED, and you will need to manually RESUME the mirroring session.

Advantages Database Mirroring: Database mirroring architecture is more robust and efficient than Database Log Shipping. It can be configured to replicate the changes synchronously to minimized data loss. It has automatic server failover and client failover mechanism. Configuration is simpler than log shipping and replication, and has built-in network encryption support (AES algorithm). Disadvantages of Database Mirroring: Potential data lost is possible in asynchronous operation mode. RTO will vary and depend on several factors, such as propagation interval time and bandwidth speed. Mirror server/database is not available for user operation. It only works at database level and not at server level. It only propagates changes at database level, no server level objects, such as logins and fixed server role membership, can be propagated.