“Done in 7 minutes” -SQL Server 2019 Install2 min read

This blog comes to you from the home office after three days of caring for my sick six-year-old son. Yay for stomach bugs…

Have you ever needed to install SQL Server for a quick test of a feature, stand up a fresh instance for a team, or automation?

Like anything with technology, there are multiple ways to accomplish something. Sure, you could track down the DVD, stick it in the server and go through the Setup.  Oh, maybe if the year was 2015. These days you have the ISO stored on a network share, mount it to the VM, and run Setup.

I choose to build PowerShell scripts to accomplish this type of request. Recently I decided to perform some time metrics to see how quickly I could get an instance ready for a user.

My demo will walk through using dbatools.io and PowerShell to perform two different types of installations of SQL Server 2019.

Using the Install-DbaInstance function, I performed an installation using splatting and a configuration.ini file.

Demo One – Splatting

Above, you can see the script executed utilizing the PowerShell Splatting format.

  1. Set the server name that you want to install SQL Server on.
  2. To optimize the installation, it is best to slipstream the patches after the installation, so second, you will point the installation process to the location of your patches.
  3. Finally, the parameters can be assigned for each needed installation value.

Notice how I started and ended the script with the Get-Date command to keep track of the time it takes from start to finish.

For this installation, the timing results are as follows:

Install Start – 1:50:19 PM

Install Complete – 1:57:47 PM

Total Time – 7 minutes


Demo Two – Configuration.ini File

This demonstration is for you if you have a pre-configured configuration.ini file that you simply change settings in.

Let us see how this type of installation differs when comparing the installation times.

Install Start – 1:38:49 PM

Install Complete – 1:47:01PM

Total Time – 9 minutes


Conclusion

We achieved automated installs with both types of SQL Server installation options, fully patched in less than 10 minutes.

Leave a Reply

Your email address will not be published.