Whether it’s in our personal lives or the professional one, we do have checklists for certain tasks.

On the professional level, it can be purely technical like SQL Server installation, configuration or even uninstall, but they can also be not so technical like when a colleague join the team and someone needs to request permissions to access the company’s tools (such as ticketing/incidents/VPN/etc).

What about when a colleague leaves the company?

What is your checklist for this situation? At first, and the most obvious is to “rollback” the things done when that person joined the company. For instance:

Continue reading

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 ways to do it. In this post I will share how you can do it from all files that belongs to the system_health extended event session. (Not only the current file). This works on SQL Server 2012 or higher version. For a better overview I recommend you to read the What are SQL Server deadlocks and how to monitor them article from SQLShack.

Continue reading

On one of the last clients I have worked, I have implemented dbachecks in order to get the state of art and know how cool or bad the environments are before start knocking down the bad practices.

This client has seven different environments with more than 100 instances and more than 2000 databases.

Serial execution

A non-parallel execution (single session) took more than 2 hours. This is not a big problem when we run it out of hours and we don’t want/need to be looking or waiting for it to finish. I set up it to run at 6 in the morning and when I arrive at the office I can refresh the Power BI dashboard a get a recent state of art.

Continue reading

I was using open source PowerShell module dbatools ( GitHub repository ) to get the list of SQL Server services I have on a bunch of hosts so I could confirm if they are in “running” state.

– Quick note – For those who don’t know, dbatools is a module, written by the community, that makes SQL Server administration much easier using PowerShell. Today, the module has more than 260 commands. Go get it and try it! If you have any doubt you can join the team on the #dbatools channel at the Slack - SQL Server Community . – Quick note –

Continue reading

On my day to day work I use Nagios monitoring software. I want to add some custom SQL Server scripts to enrich the monitoring, and to accomplish this I will need to:

  • Find a folder
  • Create a sub folder
  • Copy bunch of file
  • edit a ini file to verify/add new entries

all of this for every single host on my entire estate. Obviously (for me :-) ) I decided to use PowerShell!

Continue reading