Backup your SQL instances configurations to GIT with dbatools – Part 2 – Add parallelism

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 … Continue reading Backup your SQL instances configurations to GIT with dbatools – Part 2 – Add parallelism

Backup your SQL instances configurations to GIT with dbatools – Part 1

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 … Continue reading Backup your SQL instances configurations to GIT with dbatools – Part 1

Replicate permissions to new Login/User with dbatools

Continuing to share tips and tricks using dbatools like the Refresh databases that belongs to availability group using dbatools posted a few days ago, today I will share a way to export the permissions of a login/user at instance/database level and apply them to a new login/user. The typical request Client: "We have a new … Continue reading Replicate permissions to new Login/User with dbatools

Export Deadlocks to file from system_health Extended Event using PowerShell

Just a quick post as may help any of you searching for this. Scenario Client wants to analyze most recent deadlocks that happened on a specific instance. They asked us to send the xdl files. How do we get the deadlocks? Depending on the version of SQL Server that you are running, there are different … Continue reading Export Deadlocks to file from system_health Extended Event using PowerShell

Refresh databases that belongs to Availability Group using dbatools

Few days ago I was surfing on Twitter when dbatools asked about how it's PowerShell module changed the way people work. https://twitter.com/psdbatools/status/1261563168113012736 Open and check the answers given by the community as there is really good stuff there! My turn I have shared one of my recipes related to database refreshes. You know, when the … Continue reading Refresh databases that belongs to Availability Group using dbatools

T-SQL Copy & Paste Pattern – Increasing a performance problem

Disclaimer: The title is my assumption because I saw it in the past happening this way. This blog post aims to make you remember something: something that is obvious to you, might not be obvious to others. Scenario: A client has a process which consists of a stored procedure that wraps a bunch of other … Continue reading T-SQL Copy & Paste Pattern – Increasing a performance problem

Change Outlook sender mailbox with PowerShell – A workaround

The idea of this blog post, like many others I write, is to document a workaround solution to my problem. Hopefully I can also help someone that may be looking for the solution for this problem and stumbles accidentally (or not) on my blog. Scenario I was helping a colleague automating the creation of emails … Continue reading Change Outlook sender mailbox with PowerShell – A workaround

More PowerShell Remoting coverage in dbatools

Starting on dbatools version 1.0.31 we introduced better coverage for commands that make use of PowerShell Remoting. Which commands? Commands like Get-DbaComputerCertificate, Get-DbaPrivilege, Get-DbaClientAlias, just to mention a few of them, make use of the internal function Invoke-Command2 which uses New-PSSession when we run it against a remote computer. "Why have you changed it?" Let … Continue reading More PowerShell Remoting coverage in dbatools