Date post: | 23-Dec-2015 |
Category: |
Documents |
Upload: | philip-may |
View: | 215 times |
Download: | 0 times |
MS SQL Server 2014 Migration:
Evgeny Ternovsky, Eman Rivera,Bill Kan
Case Study Featuring in-Memory and Hybrid Cloud Scenarios
DBI-B382
AgendaAn introduction to relevant SQL Server 2014 features
Overview of DBs in question
MigrationUpgrade plan
Demos
Results and learnings
Questions
Background
SQL Server 2014 Feature OverviewPerformance Disaster
ReadinessBackupIn-Memory
OLTPManaged Backup
SQL Data Files in Windows Azure Storage
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
Lab Database
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
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
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
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
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
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
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
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
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
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
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
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
Demo
Cross-Cluster Migration for OS Upgrades
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
EventDB Database
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
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
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
Demo
In-Memory OLTP Managed Backup
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.
SQLCommon Database
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
Final Architecture
AlwaysOn Availability Group
Log and Data Files
Primary Secondary Secondary (RO intent)
Private Cloud
Demo
SQL Data files in Windows Azure storage
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.
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.
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
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
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
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
Complete an evaluation and enter to win!
Evaluate this session
Scan this QR code to evaluate this session.
© 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.