Blog Posts
Everything published on this blog since 2017, newest first. The SQL Server writing now lives at sqldba.blog.
Guides: Claude Code · PowerShell · WSL · Windows
-
How to Zip and Unzip Files with PowerShell
PowerShell has zipped and unzipped natively since version 5. Two cmdlets cover almost everything: Compress-Archive and Expand-Archive.
-
Sudo for Windows: How to Enable and Use It on Windows 11
Sudo for Windows came with Windows 11 24H2. Turn it on in Settings, then run elevated commands from a normal terminal. Not available on Windows Server.
-
Log and Filter sp_who2 Results in SQL Server
When managing SQL Server performance, the built-in sp_who2 procedure is a commonly used tool for quickly checking active processes and their resource usage…
-
PowerShell Tail: Get the Last Lines of a Log File With Get-Content
Get-Content -Tail shows the last lines of a log file, the PowerShell answer to the Linux tail command. Plus a Tail function that colours errors and warnings.
-
How to Filter Objects in SSMS
SQL Server Management Studio (SSMS) offers a quick filtering feature that lets you narrow down your search by criteria such as name, schema, or creation date…
-
SQL Server Script: Enable or Disable All SQL Agent Jobs
SQL Server Agent jobs automate tasks within SQL Server, but there are times when you need to enable or disable multiple jobs, such as during maintenance…
-
PowerShell Script: List Files with Sizes and Dates
In this blog post, we’ll go through the steps for using a PowerShell script that lists files in a directory along with their sizes and creation dates. This…
-
How to View the Definition of a Stored Procedure
In this post, I'm sharing some SQL Scripts that will help you view the definition text of Stored Procedures and other objects in SQL Server.
-
SQL Script to Show Exclusive Locks on Tables
In this post I'm sharing a SQL script that will show exclusive locks for all tables in a database, with added info to help you understand what we're looking at.