One of the main DBA’s duties is to guarantee that SQL Server instances are up-to-date in terms of patches (Service Packs, Cumulative Updates or Security Updates). Recently, dbatools added a new command that turns this validation a piece of cake. Thanks to Simone Bizzotto (@niphlod) for baking up the command that Shawn Melton (@wsmelton) and I initially requested. Some dbatools users already expressed their happiness with the command, like Jess Pomfret did here So, I thought that this information should be shared with other people too.

Continue reading

Last night, I received Adam Machanic’s ( b | t ) newsletter “Announcing sp_whoisactive v11.20: Live Query Plans”. For those who don’t know about it, sp_WhoIsActive is a stored procedure that provides detailed information about the sessions running on your SQL Server instance. It is a great tool when we need to troubleshoot some problems such as long-running queries or blocking. (just two examples) This stored procedure works on any version/edition since SQL Server 2005 SP1.

Continue reading

Today I will write just a short blog post to do a quick reminder! I still hear a lot of people suggesting CTEs because they think it works like a temporary table (you populate the table and then it can be/is reutilized). It doesn’t! From de documentation : Specifies a temporary named result set, known as a common table expression (CTE). Maybe they are focusing on the “temporary” word. Using the CTE two times will perform two different executions!

Continue reading

This month’s T-SQL Tuesday is brought to us by Ewald Cress ( blog | twitter ) and is all about “folks who have made a difference” in our careers. Thank you, Ewald! This is a great topic! Here is my short list Paulo Silva ( in ) He was my first boss in the IT world! I was his apprentice when I started my internship. He was going to move to a manager position and I had to continue his work.

Continue reading

Before I complete my question let me provide context. I’ve received an alert saying that a specific database could not allocate a new page (disk was full) The message that you will see on the SQL Server Error log is: Could not allocate a new page for database ’’ because of insufficient disk space in filegroup ‘’. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Continue reading

Author's picture

Cláudio Silva

Data Platform Architect and PowerShell lover.

Data Platform Architect

Portugal