![Page 1: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/1.jpg)
Assaf Fraenkel Senior Architect
(MCA+MCM SQL 2008)
MCS Israel
Availability and
Performance for
Tier1 applications
![Page 2: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/2.jpg)
Agenda:
Introduce the new SQL Server High Availability and Disaster Recovery solution (AlwaysOn) in SQL Server 2012.
Column Based Store - New way to boost performance
Extended Events - Briefing
Key Takeaway(s):
Get the overview of these features
According to your specific needs - deep dive into these features
Agenda and Takeaways
![Page 3: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/3.jpg)
REQUIRED 9s & DATA PROTECTION
Greater flexibility and
availability with SQL
Server AlwaysOn
Maximized hardware
resources
Support for Windows
Server Core to reduce
planned downtime
A A A
Mission Critical Confidence
BLAZING-FAST PERFORMANCE
Column-based query
accelerator for dramatic
performance gains
Faster performance for
FILESTREAM,
spatial & FTS
ORGANIZATIONAL COMPLIANCE & PEACE OF MIND
User-defined server roles
for better separation of
duties & Audit support
across editions
SharePoint & Active
Directory integration for
secure BI data
Simplified application
testing with Distributed
Replay and streamlined
troubleshooting with
Extended Events
![Page 4: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/4.jpg)
Always
On
![Page 5: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/5.jpg)
Mission Critical High Availability
Reuse existing investment
SAN versus DAS environments
![Page 6: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/6.jpg)
Multi-Database Failover
Multiple Secondaries
Active Secondaries
Integrated HA Management
Mission Critical High Availability AlwaysOn Solution in SQL 2012
![Page 7: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/7.jpg)
Providing
Database
Availability
AlwaysOn Availability Group
![Page 8: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/8.jpg)
Multi-database failover
Total of 4 secondaries
2 synchronous
secondaries
1 automatic failover pair
Synchronous and
asynchronous
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
Replication
publisher/subscriber
failover
Supported with Contained
Database, File Stream, File
Table, Service Broker
Readable Secondary
Backup from Secondary
Mission Critical High Availability
![Page 9: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/9.jpg)
AlwaysOn Availability Group 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
![Page 10: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/10.jpg)
AlwaysOn Availability Group Application Failover with Availability Group Listener
2 DB 2 DB
Parameter Sample: -server TechListener1;-catalog HRDB
ServerA ServerB ServerC
Availability Groups Listener allow applications to failover seamlessly to any
secondary; reconnecting through Virtual Network Name
2 DB
TechAG1
Primary Secondary
TechListener1
Application retry during failover
Primary Secondary Secondary
Connect to new primary
once failover is complete
and the listener is online
![Page 11: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/11.jpg)
AlwaysOn Availability Group Active Secondary : Backup and Log Shipping 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
Log Shipping
Secondary
Backups
DRP
![Page 12: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/12.jpg)
Deploying AlwaysOn Availability Group
Demo
![Page 13: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/13.jpg)
Columnstore Indexes
![Page 14: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/14.jpg)
Is This Your Data Warehouse Experience?
Wait ing…
![Page 15: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/15.jpg)
Columnstore Indexes
Wait ing…
![Page 16: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/16.jpg)
Value Proposition of Columnstore Indexes
Faster, interactive query response time
Easier data exploration
Better decisions
Reduced physical DB design effort
Fewer indexes
Reduced need for summary aggregates and
indexed views
May eliminate need for OLAP cubes
Transparent to the application
Ability to handle larger workload on given hardware
![Page 17: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/17.jpg)
ColumnStore
Indexes
in Action
Demo
![Page 18: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/18.jpg)
Memory Management
Management is automatic
Columnstore is persisted on disk
Columns (segments) fetched into memory as needed
Columnstore segments flow between disk and memory
SELECT C2, SUM(C4)
FROM T
GROUP BY C2;
T.C2 T.C4
T.C2 T.C4
T.C2
T.C2
T.C2 T.C1
T.C1
T.C1
T.C1
T.C1 T.C3
T.C3
T.C3
T.C3
T.C3
T.C4
T.C4
T.C4
![Page 19: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/19.jpg)
Advanced query processing technology
Batch mode execution of some
operations
Processes column data in
batches
Groups of batch operations
in query plan
Compact data representation
Highly efficient algorithms
Better parallelism
How Does Batch Mode Speed Up Queries?
![Page 20: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/20.jpg)
Columnstore index scan
can produce batches or
rows
Batch-enabled
operators get batches
Non-batch operators
get rows
Query optimizer decides
Processing Data
Lis
t o
f q
ualify
ing
ro
ws
Column vectors
Batch object
![Page 21: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/21.jpg)
Limitations When Using ColumnStore Indexes
Creating columnstore index
Only on common business data types
Maintain table: limited operations
Can read but not update the data
Can switch partitions in and out
Processing queries
All read-only T-SQL queries run
Some queries are accelerated more than others
Yes int, real, string, money, datetime, decimal <= 18 digits
No decimal > 18 digits, binary, varbinary, CLR, (n)varchar(max),
varbinary (max), uniqueidentifier, datetimeoffset with
precision > 2
![Page 22: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/22.jpg)
Multiple DISTINCT aggregates issue & workaround
• Table Spool if query has 2 or more DISTINCT aggregates • Spool takes time to write • Spool write is single threaded • Reads of spool in plan are single threaded, in row mode • Workaround:
form each DISTINCT agg in separate subquery Join results on grouping keys
SQL Server 2012 runs queries with 1 DISTINCT agg and 1 or more non-distinct aggs in batch mode without any spool!
![Page 23: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/23.jpg)
Columnstore indexes can enable
phenomenal performance gains
Batch mode processing is an
essential ingredient for speedup
Some adjustments to schema
and loading processes may be
necessary
Some queries can benefit from
tuning
Columnstore indexes are not a
magic bullet
Summary
![Page 24: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/24.jpg)
Diagnostic tracing using Extended Events
![Page 25: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/25.jpg)
Why do we need Extended Events? New Problems for
Diagnostics
We have
more
complex
systems
Need to
reduce
performance
impact of
diagnostics
Desire for
more
detailed
information
Need to
find
unexpected
interactions
![Page 26: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/26.jpg)
Unique Value of Extended Events
Scalability Bigger machines, more work, more
events - no problem.
Events are dynamic Collect additional data on any event
Perform an action when an event happens
Cross process event tracking Track relationship between different
tasks/threads/processes
Integrates with Windows eventing Expose tracing information to Windows
tools such as Xperf
Coordinate with trace data from other ETW Providers
![Page 27: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/27.jpg)
Key Advancements in SQL Server 2012
Graphic User Interface! Both Advanced & Wizard based event session creation.
Tabular view of event data.
Filter, Sort, Group & Aggregate right in the user interface.
Export event data to Table, CSV or XEL.
Managed APIs New Object Model:
Create, Modify and Drop event sessions.
Start & Stop event sessions.
Read event data from file or directly from a running event session.
New Events & Updated Target Names More than twice as many events (over 600).
Now includes all the same data as SQL Trace.
Asynchro-what? - event_file, historgram, event_counter
![Page 28: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/28.jpg)
Extended Events
Demo
![Page 29: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/29.jpg)
We learned:
Introduce the new SQL Server High Availability and Disaster Recovery solution (AlwaysOn) in SQL Server 2012.
Column Based Store - New way to boost performance
Extended Events - Briefing
Key Takeaway(s):
According to your specific needs - deep dive into these features
Start to Implement
Summary and Takeaways
![Page 30: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/30.jpg)
Thank
You!
![Page 31: Availability and Performance for Tier1 applicationsmscom.co.il/.../Whats_new_in_SQL_2012_v3_20.4.12.pdfAgenda: Introduce the new SQL Server High Availability and Disaster Recovery](https://reader033.vdocuments.site/reader033/viewer/2022042212/5eb5c7843b6a162c2479cef5/html5/thumbnails/31.jpg)
© 2011 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.
לצפייה במצגות :האירוע היכנסווהרצאות
http://www.microsoft
.com/israel/benext