13 Install and update SQL Server

 

Installing new SQL Servers can help you modernize your entire estate and prepare a new standardized environment. Automated updates can help keep your estate secure by streamlining the process.

In this chapter, we’ll learn how to install and update SQL Server for Windows from the command line. You’re probably familiar with installing SQL Server on-premises using the GUI. If you are a developer, you may even have installed SQL Server containers. Containers and SQL Server on Linux are basically automated right out of the box, whereas Windows isn’t command-line first. For this reason, dbatools focuses on automating the Windows-based installer.

After working through this chapter, you will be able to easily deploy several SQL Servers at once and update your entire SQL Server estate quickly, minimizing your outage windows. We’ll begin by installing SQL Server in a simplified manner, then progress to more customized installs. Once we’ve got installs figured out, we’ll move on to automating your SQL Server patching using Update-DbaInstance.

13.1 Installing

When it comes to performing automated installations of SQL Server on Windows, we have the following four common ways:

13.1.1 Benefits of automated installs

13.1.2 Local installs

13.1.3 Remote installs

13.1.4 Customizing installation options

13.1.5 ConfigurationFile and Configuration

13.1.6 Built-in parameters

13.2 Updating

13.3 The importance of patching

13.3.1 Fear of breaking everything

13.3.2 Burdensome process leads to procrastination

13.4 How we make it easier

13.5 Hands-on lab