You are on page 1of 15

HIGH AVAILABILITY OPTIONS IN SQL SERVER

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

TABLE OF CONTENT
+ What High Availability is ? + Why we need High Availability options ? + What are the High Availability options available ?

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

High Availability Definition


+ In Information Technology, high availability refers to a system
or component that is continuously operational for a desirably long length of time

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Why we really need High Availability Options ?


+ Planned Downtime
Performing database maintenance Performing batch operations Performing an upgrade/update

+ Unplanned Downtime

Data center failure Server failure I/O subsystem failure Human error

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

High Availability Options


+ + + +
Server Clustering/Failover Clustering Log Shipping Database mirroring Replication

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Failover Clustering
+ This provides high-availability for entire instance of sql server + A failover cluster is setup with a minimum of two servers,
where each server is called a node that are connected to a shared disk resource + Only one node is active at a time for a SQL Server instance and serves all the requests for that instance of SQL Server + When the active node fails, failover takes place and one of the other available nodes will become the active node

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Failover Clustering(Contd.)
+ Pros
Automatic failover Transparent client redirect It is the only technology that allows an entire SQL Server 2008 instance
to be made highly available

+ Cons
Does not protect against disk failure More expensive since it requires special hardware for the setup as well
as redundant hardware

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Log Shipping
+ Log shipping is the simplest way to provide one or more
redundant copies of a single database.

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Log Shipping(Contd.)
+ Pros

can be configured to multiple standby servers Can use compressed backup feature to limit network bandwidth Can be setup to use secondary server for read only activity No additional cost, except for the need to have another available server for the secondary copy

+ Cons
no automatic failover Other items need to be handled outside of Log Shipping such as logins,
SQL Agent jobs, etc... Requires additional storage for log backups and shipped copy

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Database Mirroring
+ Database mirroring provides a redundant copy of a single
database that is automatically updated with changes. The purpose is to ensure continuous data availability and minimize or avoid downtime.

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Database Mirroring(Contd.)
+ Operating Modes
High Availability High Safety High Performance

+ Requirement
Data and Log file locations should be same on both the principal and
mirror servers Database name should be same on both the principal and mirror servers Service accounts should be same on both the instances of SQL Server

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Database Mirroring(Contd.)
+ Pros
Automatic failover(only in high availability mode) Automatic client redirection(in all the three modes) Both server instances contain identical information(as per synchronous
operation) Faster performance(as per asynchronous operation)

+ Cons
Doesnt support cross-database transactions and distributed
transactions Latency can slow down operation(in case of synchronous operation) In asynchronous operation, no guarantee of identical information in both server instances at all the times

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Replication
+ Replication feature in MS SQL Server moves the data from a
remote server to our local server boxes via publications and subscriptions mechanism with the purpose to maintain redundant database sites.

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Replication(Contd.)
+ Types of replication

Transactional Replication Transactional Replication with Updatable Subscriptions Snapshot Replication Merge replication

Copyright 2011 FactSet Research Systems Inc. All rights reserved.

Replication(Contd.)
+ Pros
Can be configured for individual database objects instead of the entire
database Provides near real time disaster recovery Secondary copy could be used for near real-time reporting to offload reporting use on production database

+ Cons
Reconfiguration may require manual intervention Need to rely on distributor to push changes Other items need to be handled outside of Replication such as logins,
SQL Agent jobs, etc...

Copyright 2011 FactSet Research Systems Inc. All rights reserved.