Upgrading to SQL Server 2016 Thomas LaRock Head Geek™ SolarWinds
Why Are You Here? You want/need to upgrade
Why Are You Here? You want/need to upgrade You’ve had trouble with upgrades in the past
Why Are You Here? You want/need to upgrade You’ve had trouble with upgrades in the past Users are scary when they’re mad
A Little About Me Thomas has over 20 years experience in roles including programmer, developer, analyst, and DBA. He enjoys working with data, probably too much to be healthy.
A Little About SolarWinds solarwinds.com/products
Agenda 1 Why upgrade? 2 Pre-upgrade tasks 3 Upgrade tasks 4 Post-upgrade tasks 5 Questions
Agenda 1 Why upgrade? 2 Pre-upgrade tasks 3 Upgrade tasks 4 Post-upgrade tasks 5 Questions
Agenda 1 Why upgrade? 2 Pre-upgrade tasks 3 Upgrade tasks 4 Post-upgrade tasks 5 Questions
Agenda 1 Why upgrade? 2 Pre-upgrade tasks 3 Upgrade tasks 4 Post-upgrade tasks 5 Questions
Agenda 1 Why upgrade? 2 Pre-upgrade tasks 3 Upgrade tasks 4 Post-upgrade tasks 5 Questions
Why Upgrade? If it ain’t broke… Upgrades seen as hard; things will break Fear, uncertainty, and doubt (FUD) around upgrades Data is the most critical asset your company owns Cost, benefit, and risk
Why Upgrade? New Features Always Encrypted Dynamic Data Masking Row Level Security Stretch Database Temporal tables Query Store
Why Upgrade? New Features Supportability SQL Server 2005 ends support in April 2016 No additional fixes, SPs, or CUs released You can purchase a VERY expensive yearly support plan SQL Server 2008 ends extended support in July 2019* Supportability
Why Upgrade? New Features 3rd party tools may require latest version of SQL Server (or earlier, possibly) Check with vendor prior to any upgrade Supportability Vendor Requirements
Why Upgrade? Possible rule: ‘No more than one major version behind’ New Features Possible rule: ‘No more than one major version behind’ Company/industry standards vary Auditors Supportability Vendor Requirements Company Standard
Pre-Upgrade Tasks SQL 2000 SP4 SQL 2005 SP4 SQL 2008 SP3 Know your path SQL 2000 SP4 SQL 2005 SP4 SQL 2008 SP3 SQL 2008R2 SP2 SQL 2012 SP2 SQL 2014
Pre-Upgrade Tasks SQL 2000 SP4 SQL 2005 SP4 SQL 2008 SP3 Know your path SQL 2000 SP4 SQL 2005 SP4 SQL 2008 SP3 SQL 2008R2 SP2 SQL 2012 SP2 SQL 2014
Pre-Upgrade Tasks Know your path Licensing changes Was per socket, now per core (as of SQL 2012) Per core may be more expensive In-place upgrades may not be reasonable SQL 2016 SP1 allows for additional features available in Std edition
Pre-Upgrade Tasks Know your path Licensing changes Know your options In Place Upgrade current instance of SQL Server to be the next version of SQL Server Side-By-Side Install SQL Server on new/existing hardware and eventually cut over databases when necessary
Pre-Upgrade Tasks Know your path Licensing changes Know your options Gather inventory details Microsoft Assessment and Planning Toolkit, SQL Power Doc (Codeplex) Consider object counts (i.e., number of tables) Inventory of applications using the server Application-specific configurations
Pre-Upgrade Tasks Know your path Licensing changes Know your options Gather inventory details Data Migration Assistant
Pre-Upgrade Tasks Deprecated features Discontinued features
Pre-Upgrade Tasks Deprecated features Discontinued features Breaking changes Behavioral changes Breaking Changes that *might* break based on earlier versions of SQL Server Behavioral Changes that affect how features work or interact compared to earlier versions of SQL Server
Pre-Upgrade Tasks Deprecated features Discontinued features Breaking changes Behavioral changes Read the Release Notes
Pre-Upgrade Tasks New environment requirements
Pre-Upgrade Tasks New environment requirements Take baselines
Pre-Upgrade Tasks New environment requirements Take baselines Capture workloads
Pre-Upgrade Tasks New environment requirements Take baselines Capture workloads Test server O/S
Pre-Upgrade Tasks New environment requirements Take baselines Capture workloads Test server O/S Take backups
Upgrade Tasks Types of upgrades In Place Upgrade current instance of SQL Server to be the next version of SQL Server Side-By-Side Install SQL Server on new/existing hardware and eventually cut over databases when necessary
Upgrade Tasks Types of upgrades Data migration techniques In Place Upgrade current instance of SQL Server to be the next version of SQL Server Backup/restore (or detach/attach) Database mirroring Side-By-Side Install SQL Server on new/existing hardware and eventually cut over databases when necessary Pre-staging (log-shipping) Availability Groups
Upgrade Tasks – In-Place Upgrades Verify backups exist Both user and system databases If database not in SIMPLE recovery mode, make certain a transaction log backup exists Verify that these backups can be restored
Upgrade Tasks – In-Place Upgrades Verify backups exist Review prerequisites
Upgrade Tasks – In-Place Upgrades Verify backups exist Review prerequisites Run installation media
Upgrade Tasks – In-Place Upgrades Verify backups exist (will cover this later) Review prerequisites Run installation media Do post-upgrade tasks
Upgrade Tasks – In-Place Upgrades Verify backups exist And then test some more, make sure everything is working as expected Review prerequisites Run installation media Do post-upgrade tasks Test, test, test
Upgrade Tasks – Side-by-Side Upgrades For existing system For new system Review prerequisites Install SQL Server Run scripts Data migration
Upgrade Tasks – Side-by-Side Upgrades For existing system For new system Verify backups Review prerequisites Script system objects Install SQL Server Script SSIS packages Run scripts Take database offline Data migration
Upgrade Tasks – Side-by-Side Upgrades For existing system For new system Verify backups Review prerequisites Review prerequisites Script system objects Install SQL Server Install SQL Server Script SSIS packages Run scripts Run scripts Take database offline Data migration Data migration
Upgrade Tasks – Rolling Upgrades Choose your high-availability method (log-shipping, mirroring, Availability Groups) Primary Secondary
Upgrade Tasks – Rolling Upgrades Upgrade one of the secondary nodes following the in-place upgrade steps Primary Secondary
Upgrade Tasks – Rolling Upgrades Failover to that secondary node Failover Primary Secondary
Upgrade Tasks – Rolling Upgrades Perform any post-upgrade tasks Secondary Primary
Upgrade Tasks – Rolling Upgrades Test, test, and test that everything is working as expected Secondary Primary
Upgrade Tasks – Rolling Upgrades Repeat for any remaining secondary nodes Node Node Node Secondary Primary
Upgrade Tasks – Rolling Upgrades Repeat for any remaining secondary nodes Node Node Node Secondary Primary
Upgrade Tasks – Rolling Upgrades Repeat for original primary node Node Node Node Secondary Primary
Upgrade Tasks – Rolling Upgrades Perform any post-upgrade tasks Node Node Node Secondary Primary
Upgrade Tasks – Rolling Upgrades Fail back to original primary node Node Node Node Primary Secondary
Upgrade Tasks – Rolling Upgrades Test, test, and test that everything is working as expected Node Node Node Primary Secondary
Post-Upgrade Tasks Take backups
Post-Upgrade Tasks Take backups DBCC commands
Post-Upgrade Tasks Take backups DBCC commands Updating statistics
Post-Upgrade Tasks Take backups DBCC commands Updating statistics Refresh view definitions
Post-Upgrade Tasks Take backups DBCC commands Updating statistics Refresh view definitions Check compatibility levels
Post-Upgrade Tasks Take backups DBCC commands Updating statistics Refresh view definitions Check compatibility levels Verify counts (data from inventory gathering)
Post-Upgrade Tasks Take backups DBCC commands Updating statistics Refresh view definitions Check compatibility levels Verify counts (data from inventory gathering) Check configurations
Tips & Tricks Rolling Upgrades But you only go 1-way: upwards Great for large systems Or systems that need minimal downtime
Tips & Tricks Rolling Upgrades Newer is Better Backup/restore and detach/attach are easy Great for small-mid size databases Or systems that allow for downtime Newer is Better
Tips & Tricks Rolling Upgrades Newer is Better Learn to Count Simple counts of objects Compare datatypes and collations worth effort Compare configurations Newer is Better Learn to Count
Maintains consistency Tips & Tricks Script all the things Scripting saves time Maintains consistency Inventory collection
Tips & Tricks Script all the things Azure option for POC Azure is easy to use Azure makes it easy to test Just make sure you clean up when done Azure option for POC
Tips & Tricks Script all the things Azure option for POC Identify mission-critical queries Build checklist of queries for testing Test with minimal changes Azure option for POC Baseline performance
Tips & Tricks Query Store Help maintain performance Freeze/unfreeze plans Mitigate risk
Tips & Tricks Query Store DMA isn’t perfect DMA may not catch everything But it does catch a lot Assists with migrating data DMA isn’t perfect
Tips & Tricks Query Store DMA isn’t perfect Data Migration Guide Create migration plybook Discover, migrate, test, optimize Build business case DMA isn’t perfect Data Migration Guide
Agenda 1 Why upgrade? 2 Pre-upgrade tasks 3 Upgrade tasks 4 Post-upgrade tasks 5 Questions
FOR MORE INFORMATION http://tinyurl.com/msdn-always-encrypted http://tinyurl.com/msdn-dynamic-data-masking http://tinyurl.com/msdn-row-level-security http://tinyurl.com/msdn-stretch-db http://tinyurl.com/msdn-temporal-tables http://tinyurl.com/msdn-query-store http://tinyurl.com/sql2016-sp1-released http://tinyurl.com/sql2016-requirements http://tinyurl.com/install-config-check http://tinyurl.com/data-migration-guide
9/19/2018 6:29 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.