+ All Categories
Home > Documents > Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Date post: 23-Dec-2015
Category:
Upload: philip-may
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
40
Transcript
Page 1: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.
Page 2: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

MS SQL Server 2014 Migration:

Evgeny Ternovsky, Eman Rivera,Bill Kan

Case Study Featuring in-Memory and Hybrid Cloud Scenarios

DBI-B382

Page 3: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

AgendaAn introduction to relevant SQL Server 2014 features

Overview of DBs in question

MigrationUpgrade plan

Demos

Results and learnings

Questions

Page 4: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Background

Page 5: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

SQL Server 2014 Feature OverviewPerformance Disaster

ReadinessBackupIn-Memory

OLTPManaged Backup

SQL Data Files in Windows Azure Storage

Page 6: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Databases in QuestionSupport the automated test system that is used within DPG at Microsoft

Mission-critical

Accessed mostly through automation, with limited manual reporting queries

Originally built 10+ years ago with limited further engineering investment

LabAutomated test case repository and execution status tracking

1 TB 7,000

tran/sec

99.9%

availability

EventDB Error and performance telemetry

1.5 TB 23,500

tran/sec

99.9%

availability

SQLCommon Common server for variety of DBs used by supporting tools

100-2,000

tran/sec

99.9%

availability10-300

GB

Page 7: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Lab Database

Page 8: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Architecture

Primary Secondary Secondary

Before

ReportingBackupTransactional Replica

Primary Secondary Secondary

After

R2

ReportingBackupTransactional Replica

ProblemHardware is non-uniform specification and approaching end of warranty

Need to upgrade to Windows Server 2012 R2 to allow for infrastructure standardization

Performance bottlenecks expected given projected workload growth rate

Close to zero tolerance for downtime

SolutionPerform a cross-cluster migration to new hardware, OS, and SQL Server version

ResultsMigration completed with only 3 minutes of downtime

Page 9: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Primary

Lab

Node 2Secondary

Lab

Node 3Secondary

Lab

AG Listener – LabDB

WSFC2012R2

Node 4 Node 5 Node 6

R2

Page 10: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Primary

Lab

Node 2Secondary

Lab

Node 3Secondary

Lab

AG Listener – LabDB

WSFC2012R2

Node 4 Node 5 Node 6

R2

Page 11: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Secondary

Lab

Node 2Primary

Lab

Node 3Secondary

Lab

AG Listener – LabDB

WSFC2012R2

Node 4 Node 5 Node 6

R2

Page 12: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Secondary

Lab

Node 2Primary

Lab

Node 3Secondary

Lab

AG Listener – LabDB

WSFC2012R2

Node 4 Node 5 Node 6

R2

Page 13: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Secondary

Lab

Node 2Primary

Lab

Node 3Secondary

Lab

AG Listener – LabDB

WSFC2008R2

Node 4 Node 5 Node 6

R2

Page 14: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Secondary

Lab

Node 2Primary

Lab

Node 3Secondary

Lab

AG Listener – LabDB

R2

Lab Lab Lab

Node 4Secondary

Node 5Secondary

Node 6Secondary

WSFC2008R2

Page 15: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

AlwaysOn Availability Group - LabAG

Node 1Secondary

Lab

Node 2Primary

Lab

Node 3Secondary

Lab

R2

Lab Lab Lab

Node 4Secondary

Node 5Secondary

Node 6Secondary

WSFC2008R2

Page 16: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

Node 1

Lab

Node 2

Lab

Node 3

Lab

R2

Lab Lab Lab

Node 4 Node 5 Node 6

WSFC2008R2

Page 17: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

Node 1

Lab

Node 2

Lab

Node 3

Lab

R2

Lab Lab Lab

Node 4 Node 5 Node 6

WSFC2012R2

Page 18: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

Node 1

Lab

Node 2

Lab

Node 3

Lab

WSFC2012R2R2

Lab Lab Lab

Node 4Primary

Node 5Secondary

Node 6Secondary

AlwaysOn Availability Group - LabAG

Page 19: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Cross-Cluster Migration ProcedureProcedureUpgrade secondary SQL 2012 nodes to SQL 2014

Fail over to one of the 2014 nodes

Upgrade the old primary to SQL 2014

Switch nodes 4, 5, and 6 to use remote WSFC 2008 R2 cluster context

Add nodes 4, 5, and 6 to the AG: this is the data synchronization stage

Delete the LabAG listener: this is the start of the downtime

Set LabAG offline

Switch nodes 4, 5, and 6 to use the local WSFC 2012 R2 cluster context

Create new AG, LabAG

Create new AG listener, LabDB: this is the end of the downtime

WSFC2008R2

Node 1

Lab

Node 2

Lab

Node 3

Lab

WSFC2012R2R2

Lab Lab Lab

Node 4Primary

Node 5Secondary

Node 6Secondary

AlwaysOn Availability Group - LabAG

AG Listener – LabDB

Page 20: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Demo

Cross-Cluster Migration for OS Upgrades

Page 21: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Learnings and RecommendationsPrepareRead the documentation. Then, read it again!Create a deployment walkthrough for your scenario Use scripts where possible to minimize manual errorsAssess your infrastructure and features being used. Some examples of this include:

Compatibility level (incl. new cardinality estimator in SQL Server 2014)Scheduled backup jobsDBCC update usageTransactional replication

MigrationStick to your planHave rollback plans ready for various points in the deployments in case something goes wrong

Page 22: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

EventDB Database

Page 23: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

BackgroundProblemHigh load: data collected for 8,100 client machines on availability, exceptions, and service telemetryA load over 3,800 transactions/sec would cause backups due to latching, resulting in data gapsBackup is short-term local, long-term tape offsite, requiring costly management, facilities, & hardware

SolutionImplement In-Memory OLTP to address performance gapsImplement Managed Backup to make backup a minimal-touch operation

Results6x gains on input rate: can now handle 23,500 transactions/secondDaily report execution times reduced by 30-80%No interaction with backup system required since introduction of Managed Backup

Page 24: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Hardware Architecture

Local Backup

Primary Secondary Secondary

Off-site backup

4x Intel XeonE7540

128 GB

OS: 280GB RAID-1 SAS HDDMDF/LDF: 2.3TB Attached SAN

Before

Primary Secondary Secondary

After

4x Intel Xeon E5-4610 0

512 GB

OS: 280GB RAID-1 SAS HDDLDF: 750GB RAID-10 SATA SSDMDF: 1.8TB Attached SAN R2

Managed Backup

Page 25: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Service Architecture

Web Service

Standard T-SQLstored procedure

Natively-compiledstored procedure

In-Memorytables

Hot data (real-time)0-5 minutes

SQL Agent job Disk-basedtables

Cold data5 minutes to 30 daysApprox. 1.5B records

Standard T-SQLstored procedure

Disk-basedtables

SQL Server Reporting ServicesPowerPivotPerf counters

ExceptionsStack traces

Page 26: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Demo

In-Memory OLTP Managed Backup

Page 27: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Learnings and RecommendationsUnderstand your workload and bottlenecksUse the management warehouse together with the Memory Optimization Advisor and Native Compilation Advisor tools to decide where the biggest benefits will be gainedPerform workload replaysEstablish your baseline

Understand your applicationNot all scenarios can take advantage of In-Memory OLTPUnderstand In-Memory OLTP implementation considerationsDefine your architectural pattern and implementation

Perform targeted migrationPerform targeted and staged migrations: first tables, then T-SQL code.

RepeatOnce the initial batch of bottlenecks is addressed, iterate on the process until metrics are acceptable.

Page 28: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

SQLCommon Database

Page 29: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

BackgroundProblemThe data in the DB is the value proposition: losing it is simply unacceptableFast recovery from a disaster scenario is expected by the customers: time to recovery from off-site backups is unacceptable

SolutionUse the SQL Data Files in Windows Azure Storage feature to create a fast disaster recovery option

Page 30: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Final Architecture

AlwaysOn Availability Group

Log and Data Files

Primary Secondary Secondary (RO intent)

Private Cloud

Page 31: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Demo

SQL Data files in Windows Azure storage

Page 32: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Learnings and RecommendationsPrepare for deploymentA lot of steps can be completed prior to deployment day. Take advantage of this!

For instance, storage containers should be created through the Azure Portal prior to deployment

Create one container per database for isolation

Think about securityMoving to the cloud generates keys, certificates, and other collateral that should be securely storedDetermine an ongoing security protocol such as rotating keys and passwords

Harness the CloudFind the right balance of private cloud and Windows Azure architecture that works for your scenario.

Page 33: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

ConclusionSQL Server 2014A huge amount of opportunities are opened with this release. Performance, disaster recovery, and simplified backup are just some of the options demoed today.

PlanningWith sufficient planning and the right approach, minimal or no downtime is possible for both upgrade to SQL Server 2014 and deployment of product features.

MigrationAutomate your migrations as much as possible, have rollback processes, and use a staged approach.

Page 34: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Useful LinksCross-Cluster Migration whitepaper and scriptsIn-Memory OLTP: common workload patterns and migration considerationsMSDN:• In-Memory OLTP• Managed Backup• SQL Data Files in Windows Azure Storage

Page 35: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Breakout SessionsIn-Memory OLTP:

DBI-B287 (overview)DBI-B384 (preparing for migration)DBI-B313 (customer deployments, lessons learned)DBI-B315 (monitoring and troubleshooting)

Hybrid-cloud scenarios:DBI-B383 (private and hybrid cloud features)

Related content

LabsDBI-IL301(-R) (What’s new in SQL Server 2014 for the DBA)

MSE: Data Platform and Business Intelligence

Find Me Later At. . .Closing Attendee Party

Page 36: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Track resources

Download Microsoft SQL Server 2014 http://www.trySQLSever.com

Try out Power BI for Office 365! http://www.powerbi.com

Sign up for Microsoft HDInsight today! http://microsoft.com/bigdata

Page 37: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Resources

Learning

Microsoft Certification & Training Resources

www.microsoft.com/learning

msdn

Resources for Developers

http://microsoft.com/msdn

TechNet

Resources for IT Professionals

http://microsoft.com/technet

Sessions on Demand

http://channel9.msdn.com/Events/TechEd

Page 38: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Complete an evaluation and enter to win!

Page 39: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

Evaluate this session

Scan this QR code to evaluate this session.

Page 40: Case Study Featuring in-Memory and Hybrid Cloud Scenarios.

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.


Recommended