easy way to do rolling upgrades for sql server

17
SQL Server Rolling Upgrades— The Easy Way! By Argenis Fernandez Senior Database Engineer, SurveyMonkey © 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Upload: solarwinds

Post on 13-Apr-2017

296 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Easy way to do rolling upgrades for SQL Server

SQL Server Rolling Upgrades—The Easy Way!

By Argenis Fernandez

Senior Database Engineer, SurveyMonkey

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 2: Easy way to do rolling upgrades for SQL Server

About Your Speaker Today

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

» SQL Server MVP

» Member of the Database Engineering team at SurveyMonkey

» Formerly: Senior Consultant, Microsoft Consulting Services & Senior DBA at Outerwall and Ultimate Software

» Microsoft Certified Master: SQL Server 2008, Microsoft Certified Solutions Master: Charter - Data Platform

» 2014 Friend of Red Gate Software

» 2012-2013 Idera SQL Server ACE

» DBA/Dev/SysAdmin for 15 years

» Regular Speaker (PASS Summit, PASS SQLRally, SQLBitsXI, TechEd 2013, IT/DevConnections)

» Founded and lead the Security Virtual Chapter for PASS

» Twitter enthusiast; infrequent blogger.

Page 3: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

What is a Rolling Upgrade?

“Upgrade of a software version, performed without a noticeable downtime or other

disruption of service”

Page 4: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Scope for Today’s Talk

» Heavy focus on Database Mirroring (Because it’s actually easy!)

» Will evaluate Log Shipping as an alternative for rolling upgrades

» Explore (not in detail) how to handle Availability Groups on SQL Server 2012 and SQL Server 2014

» FCI (Clusters) – brief mention

» We will NOT discuss OS-level upgrades. That’s an ENTIRELY different talk!

Page 5: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Features and Builds

» Database Mirroring: SQL Server 2005 SP1 and above

» Failover Cluster Instances: SQL Server 2008 RTM and above

» Availability Groups: SQL Server 2012 RTM and above

Page 6: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

In-Place Upgrades Are Not Great.

» Too much risk inherent to upgrade process

» There is no easy way to test an in-place upgrade

» The last thing you want to find out is that the upgrade failed, and you’re left with a brick

» Clean installs on freshly imaged servers are always recommended, if you can afford to have them

Page 7: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Mirroring for Rolling Upgrades?

» High Availability!

» Available in Standard Edition

» No need for a WSFC (Windows Server Failover Cluster)

» Duplication of data offers a plausible rollback plan, while still maintaining minimal downtime

» You do NOT need similar hardware for the mirror

Page 8: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Rolling Upgrades with Mirroring: BOL Diagram Edition

Page 9: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Demo

Rolling Upgrade Using Database Mirroring

Page 10: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Log Shipping Is Underrated

» Included with every Edition of SQL Server

» Mirroring was once referred to as “Real-time Log Shipping”

» You can use the GUI to set it up, or roll your own

» SQL Server jobs can run every 10 seconds, but you can roll your own scripts and copy/restore even more frequently

Page 11: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Demo

Rolling Upgrade using Log Shipping

Page 12: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

What About Availability Groups?

» “It’s Complicated!” – Not really

» It might indeed appear complex, but follow best practices and you’re on your way

» Always upgrade the remote instances first, then the local secondaries, THEN the primary

» Take cautionary measures to avoid downtime!

» Best reference I can point to is: http://msdn.microsoft.com/en-us/library/dn178483.aspx

Page 13: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Demo

Rolling Upgrade using Availability Groups

Page 14: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

FCI (Failover Clustered Instances)

» Upgrade passive node(s), then failover and upgrade the active node

» The database will be upgraded upon failover, just like in all the previous cases.

Page 15: Easy way to do rolling upgrades for SQL Server

Questions?

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Page 16: Easy way to do rolling upgrades for SQL Server

© 2012 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Download your free trial of SolarWinds DPA

» Trial Database Performance Analyzer FREE for 14 days.

» Identify and recommend action performance issues

» Fast install, very minimal load

» www.solarwinds.com/dpa

16

Page 17: Easy way to do rolling upgrades for SQL Server

© 2014 SOLARWINDS WORLDWIDE, LLC. ALL RIGHTS RESERVED.

Thank You!

The SOLARWINDS and SOLARWINDS & Design marks are the exclusive property of SolarWinds Worldwide, LLC, are registered with the U.S.

Patent and Trademark Office, and may be registered or pending registration in other countries. All other SolarWinds trademarks, service

marks, and logos may be common law marks, registered or pending registration in the United States or in other countries. All other

trademarks mentioned herein are used for identification purposes only and may be or are trademarks or registered trademarks of their respective

companies.