We have seen how we can export and save the results to a folder and commit them to a GIT repository on my last blog post Backup your SQL instances configurations to GIT with dbatools – Part 1 . At the end of that post, I have mentioned that I would write about how we can lower down the execution times of our script by leveraging on parallelism.

Going parallel

When we need to manage dozens of servers/instances, even with automated scripts sometimes we would like that our script finishes faster. There are multiple reasons that a sequential (one-by-one) run takes longer. Few examples I have hit in the past:

Continue reading

Today I want to share how I’m keeping a copy of instances’ configurations using dbatools .

Chrissy LeMaire ( B | T ) wrote about it before on the Simplifying disaster recovery with dbatools blog post. In this post, I will add one step and save the output on a GIT repository.

Pre-requirements

  • You need a GIT repository
  • GIT tools installed on the server where you are running the script so you can commit your changes
  • dbatools
  • A list or a place to get all instances that you want to run the export

Preparation

Git repository

Clone your repository to a location where dbatools can write to.

Continue reading