3 The dbatools lab

 

Now that you’ve installed dbatools, it’s time to connect to a nonproduction SQL Server instance! If you don’t already have SQL Server installed, this chapter will help you set up a lab where you can safely explore dbatools’s features and commands. This will allow you to test examples and labs from this book without worrying about causing any harm along the way.

Setting up a lab will give you the freedom to practice retrieving information as well as test some more complicated scenarios such as setting up log shipping or migrating databases between SQL Server versions.

By the end of this chapter, you’ll have an ideal SQL Server lab, either in Windows or using Docker. The choice is up to you.

3.1 Why is a lab included in this book?

3.2 Two options for building a dbatools lab environment

3.3 Option 1: Windows lab

3.3.1 Installation media for our lab

3.3.2 Building the lab

3.3.3 Configuration scripts

3.3.4 Windows lab is ready for action

3.4 Option 2: Quick demo environments using containers

3.4.1 Running SQL Server in a container