Welcome to Manning India!

We are pleased to be able to offer regional eBook pricing for Indian residents.
All eBook prices are discounted 40% or more!
Learn dbatools in a Month of Lunches
Chrissy LeMaire and Rob Sewell
  • MEAP began August 2019
  • Publication in Spring 2020 (estimated)
  • ISBN 9781617296703
  • 400 pages (estimated)
  • printed in black & white

This is an excellent resource to use for advancing your skills with advanced administration for SQL servers, regardless of the number of servers you are administering.

Joseph Houghes
An effective DBA is an efficient DBA. And if you work with SQL Server, dbatools is a lifesaver. With over 500 commands, this free and open source PowerShell module has the horsepower to automate just about every task you can imagine—and then some! Written by dbatools creator Chrissy LeMaire and dbatools advocate Rob Sewell, Learn dbatools in a Month of Lunches teaches you techniques that will make you more effective—and efficient—than you ever thought possible.
Table of Contents detailed table of contents

1 Before you begin

1.1 Why Data Professionals can’t afford to ignore PowerShell

1.1.1 A SQL Server DBA first win with PowerShell

1.2 Automate it

1.3 What is dbatools?

1.4 Is this book for you?

1.5 How to use this book

1.5.1 The main chapters

1.5.2 Hands-on labs

1.5.3 Supplementary materials

1.5.4 Further Exploration

1.6 Contacting us

1.7 Being immediately effective with dbatools

2 Installing dbatools

2.1 Minimum Requirements

2.1.1 Server

2.1.2 Workstation

2.1.3 Ports

2.1.4 Execution Policy

2.2 Signed software

2.3 Understanding installation paths

2.4 Installation methods

2.5.1 Downloading zipped archive

2.5.2 Additional Methods

2.6 How to find and use commands, use the help system and docs.dbatools.io

2.6.1 Get-Command

2.6.2 Find-DbaCommand

2.6.3 Get-Help

2.6.4 docs.dbatools.io

2.7 Updating

2.7.2 Alternative methods

2.8 Hands-on Lab

3 Setting up your lab environment

4 A Gentle Introduction to dbatools commands

4.1 Getting started

4.2 Checking the SQL connection

4.3 First, getting help

4.4 Now, run your first dbatools command

4.5 The SqlInstance parameter

4.5.1 Single Instances

4.5.2 Multiple instances

4.6 The SqlCredential parameter

4.6.1 Connecting to Instances with SQL Authentication

4.6.2 Saving the credential to use SQL Authentication with multiple commands

4.6.3 Other methods of using credentials for SQL Authentication

4.6.4 Connecting to Instances with a different Windows Account

4.7 The ComputerName parameter

4.7.1 Methods of listing the SQL services on multiple servers

4.8 The Credential parameter

4.8.1 List Services on a server using a different account at the command line

4.8.2 List Services on a server using a different account with a credential variable

4.8.3 Listing SQL Services by type

4.9 Bonus parameter: EnableException

4.10 Hands On Lab

5 Writing to SQL Server

5.1 Piping Commands

5.2 Writing to a database

5.2.1 Importing from a CSV to a database table

5.2.2 Importing to a database table from a dbatools command

5.2.3 Creating the database table first and then importing from CSV

5.2.4 Writing the results of other commands to a table

5.2.5 Writing the results of other commands to an Azure SQL Database

5.3 Copying Tables including their data

5.3.1 PowerShell splatting

5.4 Hands-on Lab

6 Finding SQL Server instances on your network

7 Inventorying your SQL estate

8 Registered Servers

9 Logins and users

10 Backup

11 Restore

12 Building a dedicated backup test server

13 Disaster recovery

14 Install and update SQL Server

15 Performing your first advanced SQL instance migration

16 High availability

17 Scheduling dbatools tasks

18 SQL Server Agent

19 DevOps

20 Snapshots

21 Tracing the activity on the instance with dbatools

22 Security and Encryption

23 Cloud

24 Using dbatools and Pester to validate your environment

25 Coding Hints with dbatools

26 Addendum: dbatools Configurations and logging and enable exception

About the Technology

Want to automate tasks for thousands of SQL servers at once? Want to migrate an entire SQL server using just the command line? dbatools can do all that—and more. A free and open source PowerShell module, dbatools offers over 500 commands for automating SQL Server from the command line. Boasting advanced options unavailable in official tools, dbatools makes it easy to automate tasks including mass exports for simplified disaster recovery, tempdb configuration, and improving an instance’s security posture.

About the book

Learn dbatools in a Month of Lunches is a practical hands-on guide to automating SQL Server with PowerShell and the awesome dbatools module. You’ll master techniques you can immediately put into practice, from daily duties like backups and restores right through to performing security audits. Stabilize and standardize your SQL server environment, and simplify your tasks by building automation, alerting, and reporting with this powerful tool. Each lesson delivers another skill that you can use to speed through your core tasks as a SQL Server DBA!

What's inside

  • Installing dbatools in secure environments
  • Bulk-import any type of data into SQL Server
  • Instance-to-instance and customized migrations
  • Schedule and monitor PowerShell tasks in SQL Server Agent

About the reader

For database administrators familiar with SQL Server and PowerShell.

About the authors

Chrissy LeMaire is a dual Microsoft MVP, awarded for her work with SQL Server and PowerShell. She is an international speaker, and the creator of dbatools.

Rob Sewell is a passionate automator, also recognized as an MVP by Microsoft. He is a keen community contributor as an event organizer, speaker and open-source contributor.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks