Presentation is loading. Please wait.

Presentation is loading. Please wait.

AlwaysOn Mirroring, Clustering

Similar presentations


Presentation on theme: "AlwaysOn Mirroring, Clustering"— Presentation transcript:

1 AlwaysOn Mirroring, Clustering
What are they? What are they not? Who Cares? Don Conrad MCP, MCDBA, MCITP(SQL 2005/2008), MCSE Data Platforms, OCP 8/3/2013

2 WHAT ARE They? AlwaysOn, Mirroring, Clustering
Each makes data more available for reporting purposes than it might otherwise be. Two of these safeguard primary data by providing nearly instantaneous copies elsewhere. 8/3/2013

3 Primary data in alternative location.
AlwaysOn Provides primary data available in alternative location(s). Fully, or near-fully synchronized, depending on the configuration. Read-only, or no-read. Relieves primary server Load Hot-standby server(s) Mirroring Primary data in alternative location. Warm standby server and data Synchronized data No-read data Automatic or manual failover Automatic failover requires third server Clustering Hot standby server One primary data set Automatic failover 8/3/2013

4 AlwaysOn Requirements
Minimum of two sets of servers and storage, One additional set of server/storage for each additional replica Equal drive configuration for the replicas. One license for SQL Server 2012 for each server (One exception: if there’s only one secondary replica and it’s not to be in read-only mode, it needs no license) Windows Enterprise server on each server(for the clustering) Windows Failover Clustering on each server Additional network names and ips for the various components 8/3/2013

5 AlwaysOn Requirements
Cont’d A network file share accessible by servers. All SQL Service accounts must be local admin to it Decisions on the various configurations: Clustered servers listeners, read-only, back ups, latency, quorum votes etc s 8/3/2013

6 AlwaysOn Architecture
( WorkStation Public Net Public Net Public Net Server 1 Server 2 Server 3 Primary Initial entry Secondary readable Secondary Not readable Log Log Log 8/3/2013

7 AlwaysOn Availability Group ( WorkStation Server 2 Server 3 Public Net
read-write Data Base Availability Group r Server 2 Server 3 Read-only No-read 7 8/3/2013

8 8/3/2013

9 8/3/2013

10 8/3/2013

11 Configuring Availability Group Listener
AlwaysOn Configuring Availability Group Listener 8/3/2013

12 AlwaysOn Configuration Considerations
Latency: Synchronous vs. Asynchronous should respond to the amount of allowable data loss If replicas are Read-only, must use SQL code or Power-Shell to enable applications to access via connection strings, i.e. “read-intent”. Quorum votes need to be determined. The quorum is virtual, not on a separate partition Production backups, log-shipping, replications, checkdbs etc can be moved to the secondary replicas off of production Primary server can be clustered for hardware redundancy 8/3/2013

13 Mirroring Two Servers Connected Via Ethernet Primary server is active.
Mirror server passive, data not accessible. Mirror server contains a restored copy of a backup from primary database, restored database is kept in recovering mode until it becomes the primary server. Primary server sends all transactions to secondary server. These are applied synchronously i.e. immediately. Confirmation is sent to primary server before the transaction is committed. 8/3/2013

14 Mirroring failover types
Automatic failover requires a third server called the Witness server Manual failover requires only two servers, principal and mirrored 8/3/2013

15 Mirrored Topology --Automatic Failover
( WorkStation Public Net Data Data Node 1 Node 2 Primary storage Log Log Mirrored storage Witness server 8/3/2013

16 Clustering Clustering involves one or more active servers, and one standby server connected via ethernet Primary server health is monitored via software in a quorum drive. Standby server is fully configure as a SQL Server If quorum detects an active server failure, switches the related data drives to the standby server, sends alerts 8/3/2013

17 Active-Passive Node 1 active
Clustered Topology Active-Passive Node 1 active WorkStation Public Net Node 2 Node 1 Shared storage Private Net 8/3/2013

18 Active-Passive Node 2 active
Clustered Topology Active-Passive Node 2 active WorkStation Public Net Node 2 Node 1 Shared storage Private Net 8/3/2013

19 Resources required Item Hard$ Soft$ Data Protect?
AlwaysOn servers Ent Licenses % 2+ storage Mirroring server Licenses % Clustering Server license none 8/3/2013

20 Data does not exist in a vacuum.
WHY? Data does not exist in a vacuum. It must be accurate. It must be used to be beneficial. To be used it must be available: in a manner timely enough to enable appropriate decisions to be made in a timely manner; in a manner that encourages users using it via our tools, there’s always the O----- factor; quickly enough that users don’t become frustrated. AlwaysOn, Mirroring and Clustering further those goals. 8/3/2013

21 Users rely on us to provide accurate, timely data.
WHO CARES? WE DO. Users rely on us to provide accurate, timely data. Each of these techniques either safeguards data or expedites its usability. Each has its benefits, and costs. 8/3/2013

22 Replication Three types
1. SnapShot– Selected tables and data are copied to subscriber. Data is frozen, not updated. 2. Transactional—Selected tables are copied to subscriber(s); tables, indexes, data are transferred. Per synch schedule all new, committed transactions to primary table(s) are posted to subscriber based on un-replicated transactions in publisher’s log file. 3. Merge—tables, data are copied to subscribers. Updates by either subscribers or publishers are copied to the other. Rules exist to resolve conflicts. 8/3/2013

23 Replicated Topology: Transactional (
WorkStation Direct connection not guaranteed Public Net Public Net Data Committed Transactions/ re-synch Node 1 Node 2 Publisher Log Log Subscriber Data is inserted in one direction, Per re-synch schedule (Once per…to continuous). Once inserted, Data is not changed. 8/3/2013

24 Replicated Topology: SnapShot (
WorkStation Direct connection not guaranteed Public Net Public Net Data snapshot Node 1 Node 2 Publisher Log Log Subscriber Data is inserted in one direction, once. Once inserted, Data is not changed. 8/3/2013

25 Replicated Topology: Merge
Replicated Topology: Merge. Typically multiple subscribers, limited new data ( WorkStation Direct connection not guaranteed Public Net Public Net Data Committed Transactions/ re-synch Node 1 Node 2 Publisher Log Log Subscriber Data is inserted in both directions, publisher to subscriber, then vice-versus per re-synch schedule. Sequences, conflicts are decided on rules. 8/3/2013

26 SnapShot Three Meanings
1. Replication– Selected tables and data are copied to subscriber. Data is frozen, not updated. 2. Copy—Virtual copy is instantaneously produced of entire subject database. Physically exists as pointers to non-updated PAGES, not tables. When page is updated, initial page is instantiated, frozen. Can always duplicate initial data unless primary files are damaged. 3. Transaction Isolation level —new with 2008, beyond this discussion. 8/3/2013

27 summary Clustering Server Licenses Other none
Mirroring server Licenses arcane know % 27 8/3/2013 8/3/2013

28 summary Clustering, log-shipping, mirroring, replication and snapshots
All offer alternatives means of accessing primary data. Each has costs and benefits. Each can be useful depending on the nature of the data & how it’s used No one fits all needs. Each might be useful. User needs will determine which is beneficial. 8/3/2013


Download ppt "AlwaysOn Mirroring, Clustering"

Similar presentations


Ads by Google