Tag: t-sql

SQL Server insights from 25+ years in the field

Performance tips, security advisories, health check findings, and industry analysis. Practical, technically accurate, no fluff.

5 Sep 2025 · 5 min read

How to Check SQL Server Version

Six reliable methods to find your exact SQL Server version and build number, from a quick T-SQL query to SSMS server properties and the Windows control panel.

Read article →
22 Jul 2025 · 5 min read

5 Ways to Use CASE WHEN in SQL Queries

The CASE WHEN statement is one of the most versatile tools in T-SQL. This guide covers five practical ways to use it in real SQL Server environments.

Read article →
11 Jul 2025 · 6 min read

Understanding NULL in SQL: What It Means (And Doesn’t)

NULL is one of the most misunderstood concepts in SQL Server. Learn what it actually means and how to handle it correctly in your queries.

Read article →
10 Jan 2025 · 5 min read

How Does Microsoft Copilot Help with SQL Query Optimisation?

Microsoft Copilot can accelerate SQL work by generating T-SQL, identifying missing indexes, and improving query structure. Here is what it actually does and where its limits are.

Read article →
27 May 2021 · 6 min read

Update all DB growth parameters to defined increments

Default SQL Server auto-growth settings cause VLF fragmentation and autogrowth wait events. This script analyses every database and generates the correct ALTER DATABASE statements automatically.

Read article →
11 Jul 2018 · 6 min read

How to Configure SQL Server Auditing

Step-by-step guide to configuring SQL Server Auditing at both the server and database level, with T-SQL scripts you can adapt for your environment.

Read article →
15 May 2018 · 6 min read

How to Set up DB Mirroring using T-SQL

Set up SQL Server database mirroring with T-SQL to bypass GUI edition restrictions and configure synchronous or asynchronous mirroring with a repeatable, scripted process.

Read article →
15 May 2018 · 5 min read

How to Enable xp_cmdshell Using sp_configure and Run Batch File from xp_cmdshell

Enable xp_cmdshell in SQL Server using sp_configure in four T-SQL statements, plus the security controls you need before you run a single line of code.

Read article →
15 May 2018 · 6 min read

A Visual Explanation of SQL Joins

SQL joins are a leading cause of incorrect query results in production systems. Learn how each join type works and when to use it correctly in SQL Server.

Read article →
15 May 2018 · 5 min read

How to create a SQL Server Database Snapshot

A SQL Server database snapshot captures your database at a point in time, giving you a fast rollback option before risky changes with minimal overhead.

Read article →
15 May 2018 · 5 min read

How to Find Which Files Belong to Which SQL Database

Learn how to map SQL Server database files to their databases using a simple JOIN on sys.master_files and sys.databases, ordered by file size to spot problems fast.

Read article →
15 May 2018 · 8 min read

How to Find SQL Agent Tasks and Schedules

Query SQL Server Agent jobs and schedules directly from msdb using a single T-SQL script. Identify overlapping jobs, disabled tasks and performance issues fast.

Read article →
Page 1 of 2 Next →

SQL Server insights, monthly.

Performance tips, security advisories, and industry analysis. No fluff, no spam.