SQL Server 2012 AlwaysOn

download SQL Server 2012 AlwaysOn

of 30

description

hu

Transcript of SQL Server 2012 AlwaysOn

  • SQL Server 2012 - AlwaysOn

    Joo Loureiro

    Microsoft

  • About Joo Loureiro

    SQL Server Senior Support Escalation Engineer (3rd tier support level)

    Bridge between frontline support and SQL product group

    SQL Server Denali TAP Escalation Engineer (part of SQL Server Beta program)

    Blog: http://blogs.msdn.com/joaol ([email protected])

    Engaged on Service Packs, hot fixes and new product releases.

  • SQL Server High Availability Retrospective

    SQL Server High Availability Today Enterprise customers are being successful

    Dell, HP, Bwin, ServiceU, CareGroup, BigHammer

    but Solutions fragmented

    Lack important flexibility points

    Initiated holistic review of SQL HA and DR Looked at customer scenarios (RTO and RPO requirements, Local HA

    and DR)

    Enterprise blockers

    Mission Critical Needs (online ops, patching, planned and unplanned maintenance)

    Failover requirements and hardware usage

    Future needs

  • Mission Critical High Availability Solution

    Meets mission

    critical high

    availability SLA Integrated Efficient Flexible

  • AlwaysOn Availability Groups

    AlwaysOn Availability Groups is a new feature that enhances and combines database mirroring and log shipping capabilities

    Multi-database failover

    Multiple secondaries Total of 4 secondaries

    2 synchronous secondaries

    1 automatic failover pair

    Synchronous and asynchronous

    data movement

    Built in compression and encryption

    Automatic and manual failover

    Flexible failover policy

    Automatic Page Repair

    Application failover using virtual name

    Configuration Wizard

    Dashboard

    System Center Integration

    Rich diagnostic infrastructure

    File-stream replication

    Replication publisher failover

    Flexible Integrated Efficient

    Active Secondary

    Readable

    Secondary

    Backup from

    Secondary

    Automation using power-shell

  • A Flexible Solution

    AlwaysOn provides the flexibility of different HA configurations

    Synchronous

    Data Movement

    Asynchcronous

    Data

    Movement

    Shared Storage, regional and geo secondaries

    A

    A

    A

    A

    A

    Direct attached storage local, regional and geo target

    A A

  • Mission Critical

    Requirements

    Zero data loss is critical for the

    business

    Fast application recovery during

    planned and unplanned

    downtime

    Redundancy across 3

    datacenters

    Application databases and

    dependencies failover together

  • Deploy using AlwaysOn Availability

    Groups

    demo

  • Application Failover

    Availability Groups Listener allow applications to failover seamlessly to any secondary Application reconnects using a virtual name after a failover to a

    secondary

    AG_HR

    HR

    DB

    HR

    DB

    Primary Secondary HR_VNN

    -server HR_Listener;-catalog HRDB

    Application retry during failover

    Connect to new primary once

    failover is complete

    and the listener is online

    Primary Secondary Secondary

    HR

    DB

    ServerA ServerB ServerC

  • What about Server Objects?

    Introducing Contained Databases or CDBs

    Unit of application programmability in Denali

    A DB which establishes a boundary between application and server

    CDBs sever the userlogin relationship

    Windows users no longer need matching logins

    Users with passwords replace SQL logins

    CDB can be part of an availability group and can failover across replicas

    Authentication information moves with the CDB

    Limitation Other objects, like jobs are not contained and has to be managed

  • Availability Group Architecture

    Inter-node health detection,

    Failover coordination,

    Primary health detection,

    Distributed data store for settings and state,

    Distributed change notifications

    Windows Server Failover Cluster

    WSFC Common Microsoft Availability

    Platform

    Database

    Active Log Synchronization

    Database

    Active Log Synchronization

    Availability Group uses Windows

    Server Failover Cluster (WSFC) for

  • AlwaysOn Active Secondary

    IT efficiency and cost-effectiveness is critical for businesses

    Idle hardware is not an option anymore

    AlwaysOn Active Secondary enables efficient utilization of

    high availability hardware resources thereby improving

    overall IT efficiency

    Active Secondary can be utilized for

    Balancing read-only workloads

    Offloading Backup Operations

  • Readable secondary allow offloading read queries to secondary

    Close to real-time data, latency of log synchronization impact data freshness

    DB2 DB1

    SQLservr.exe SQLservr.exe

    InstanceA

    DB2 DB1

    Primary Secondary

    InstanceB

    Reports

    Primary Secondary

    Reports

    Active Secondary Making Secondary Readable

  • Read-Only Client Connectivity

    Read-Only client connection behavior determined by Availability Replica Option+ ApplicationIntent Property

    ApplicationIntent is a connection property

    Replica option determines whether a replica is enabled for read access when in a secondary role

    Read-Only Routing enables redirection of client connection to new secondary on role change

    Enable seamless redirection of application connection across replicas without manual intervention

  • Concurrency and Blocking REDO can get blocked by reporting workload REDO thread and read workload can deadlock

    Solution Internally map read workload to non blocking isolation levels (no application

    changes required) Read Uncommitted Snapshot Isolation Read Committed Snapshot Isolation Repeatable Read Snapshot Isolation Serializable Snapshot Isolation Ignore all locking hints

    Never choose REDO as deadlock victim

    Result Blocking and deadlock between Reporting workload (i.e. Query) and REDO

    thread is eliminated

    No issues with DML (INSERT/DELETE/UPDATE) as it is not allowed Will incur additional cost of row versioning.

    Read Workload Impact

  • Readable Secondary

    demo

  • Active Secondary Enabling Backup on Secondary

    Backups can be done on any replica of a database

    Backups on primary replica still works

    Log backups done on all replicas form a single log chain

    Database Recovery Advisor makes restores simple

    R/W workload

    Primary

    Backups

    Secondary

    Backups

    Secondary

    Backups

  • Restrictions, cautions, and gotchas

    Differential backups are not supported on secondary

    Only Copy-only full backups are supported on secondary

    The only distinction is the differential bitmap clearing

    Advisable for backups to be stored centrally

  • Backup from Secondary

    demo

  • Key Enhancements

    Fast instance failover through predictable

    database recovery time

    Native support for multi-site

    clustering across subnets enable DR

    using failover

    cluster instances

    Flexible Failover Policy

    Eliminates false failover

    Configurable failure condition levels

    Better diagnostics

    SMB support enables consolidation of

    more than 26 instances

    Support TEMPDB on local drive

  • Introduce Flexible Failover Policy

    Flexible Failover Policy provides administrators control over the

    conditions when an automatic failover should be initiated.

    Diagnostics

    Configurable options eliminate false failover

    Improved logging for better diagnostics

  • Reducing Planned Downtime

    Support for Windows Server Core

    Reduce OS patching by as much as 50-60%

    Support for rolling upgrade and patching of SQL Server for both Availability Groups and Failover Cluster Instance

    Fast failover time for both Availability Groups and Failover Cluster Instances

    New online operations supported

    LOB Index

    Adding of column with default

  • KB 976097 - Hotfix to add support for asymmetric storages to the Failover Cluster Management MMC snap-in for a failover cluster that is running Windows Server 2008 or Windows Server 2008 R2

    Supports SQL Server Failover Cluster Instances with AlwaysOn Availability Groups

    KB 2494036 - A hotfix is available to let you configure a cluster node that does not have quorum votes in Windows Server 2008 and in Windows Server 2008 R2

    Supports configuring optimal quorum with non-automatic failover targets

    All nodes should be in the same AD domain

    To create WFSC cluster user running creation must have: Domain account Administrator on all machines Have Create Computer objects and Read All Properties rights in AD

    Detailed Article: http://technet.microsoft.com/en-us/library/cc731002(WS.10).aspx

    Windows Server Pre-Reqs

  • Quorum: need majority of votes to operate and avoid split brain

    Two-Steps process: 1. Select nodes to vote (KB 2494036)

    1 vote if nodes that host a replica that is currently: Primary (if primary is an FCI include all possible owner nodes for that FCI) An auto failover target if the primary is also configured for auto failover

    0 votes for rest of nodes

    2. Select the quorum type: Odd number of votes, use Node Majority Even number of votes, add a witness by either:

    Adding an additional witness node and use Node Majority Using Node and File Share Majority with a protected file share (blog with

    details)

    Re-evaluate and adjust quorum after manual failover outside automatic target

    Quorum Configuration

  • Disaster Recovery

    demo

  • A

    A

    A

    A

    Reports

    Backups

    Synchronous

    Data Movement

    Asynchcronous

    Data

    Movement

    New Topology

  • Denali AlwaysOn Resource Center: http://msdn.microsoft.com/en-us/sqlserver/gg490638(en-

    us,MSDN.10)

    RCO download (available soon)

    Documentation

    MSDN forums

    Microsoft Connect

    AlwaysOn Blog

    Resources Links

  • SQL Server 2012 Highlights

    High

    Availability

    SQL Server AlwaysOn

    Security &

    Manageability

    User-Defined Server Roles

    Web &

    Breadth

    PHP Driver

    Scalability &

    Performance

    Distributed Replay

    Application Centric Failover

    Contained Database Authentication

    Local DB Runtime

    Fast FILESTEAM UTF-16

    Readable Secondaries

    Fast Full-Text Search

    Reliable, Integrated Failover Detection

    Multiple Secondaries

    Audit Enhancements

    Paging for result sets

    Column Store Index, Apollo

    HA for StreamInsight

    Management Pack for High Availability

    Backup Secondaries

    JDBC 4.0 driver

    Support for ARM processors

    Active Directory w/ SharePoint for SSRS

    Default Schema for Windows Group

    Windows Server Core Support

    Beyond

    Relational

    FileTable

    Microsoft Project Juneau

    Online Operations

    Win32 Access to Database files

    Semantic Search Platform

    Full Globe Spatial Support

    DAC Enhancements

    ODBC for Linux

    Fast Spatial Performance

    Hybrid Applications with SQL Azure

    Up to 15K Partitions/Table

    EIM

    SSIS Server

    Business

    Intelligence

    Unified Semantic Model

    Crescent Data Quality

    Alerting

    Enhanced MDS In-memory BI for corporate

    Sysprep for AS

    PowerPivot Enhancements

    Reporting as SharePoint Shared Service

    DBC & OLTP Appliances/RAs

    MDS add-in for Excel

  • Thank You

  • 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

    The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

    conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

    MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.