Author: Peter Whyte

  • Quick Performance Troubleshooting Script for SQL Server

    When your SQL Server starts to experience performance issues, it’s important to have tools at your disposal to quickly identify and address the root causes. One such tool is having a performance troubleshooting scripts that provides some insights into SQL Server’s current state; including worker threads, running queries,…

    Read More


  • Checking SQL Server Mirroring Health & Latency

    In this blog post I’m sharing info on how to check the health and latency of your Database Mirroring in SQL Server. Monitoring Database Mirroring latency in SQL Server is needed for maintaining database availability and ensuring quick failover readiness. As a DBA we should be monitoring this…

    Read More


  • SQL Server Replication Monitoring Scripts

    In this post I’m sharing scripts and tips that will help you monitor, identify and troubleshoot SQL Server Replication issues. The following is included in this article: 1. Check Latency in Log Reader Agent. 2. Check Latency in Distribution Agent. 3. Check Undistributed Commands. 4. List All Publications…

    Read More


  • Get Last Node Blip in SQL Server FCI

    In a SQL Server Failover Cluster Instance (FCI) environment, a “node blip” refers to the event when the active SQL Server instance moves from one cluster node to another. This movement, typically triggered by a Failover or planned maintenance, causes a brief outage—usually 30 to 60 seconds. While…

    Read More


  • SQL Script to Get AAG Latency

    In this post, I’m sharing a script that I use frequently as a Production SQL DBA to check Always On Availability Group (AAG) latency. Always On Availability Groups (AAG) are a high-availability and disaster recovery solution in SQL Server, allowing you to synchronize databases across multiple replicas. These…

    Read More


  • SQL Server User Permissions Audit Script

    As a Production SQL DBA, checking user permissions is a task I handle frequently. Whether it’s for proactive audits, troubleshooting access issues, or responding to unexpected requests, having a quick and reliable way to verify user permissions is needed. One of the most useful tools I rely on…

    Read More


  • Creating SQL Logins on an Availability Group (AG) Environment

    In an Always On Availability Group (AG) environment, SQL logins must be configured with consistent Security Identifiers (SIDs) across all replicas to avoid issues like orphaned users and ensure seamless authentication during failovers. In this blog post we’ll demo creating a SQL login, replicating it to secondary replica…

    Read More


  • CIDR Conversion Table / Subnet Calculator

    This blog post provides a quick reference table for CIDR notation, subnet masks, and host counts, making it a valuable tool for tasks like configuring security groups, firewall rules, and subnetting. It simplifies network planning and ensures accurate IP address allocation for efficient and secure network setups. CIDR…

    Read More


  • Keeping SQL Server and Critical Systems Up to Date

    Applying the latest patches to SQL Server, Windows OS, and underlying hardware is a vital part of maintaining secure, high-performing systems. For many organizations, this is done on a regular schedule—monthly, quarterly, or aligned with specific maintenance windows. However, for business-critical, 24/7 systems, patching takes extra planning and…

    Read More


  • How to Set the Default Database for SQL Server Users

    This blog post contains a quick guide on how to change your default database when you or your users next log in to SQL Server via SSMS. When you log into SQL Server using SSMS and open a new query window, you will automatically be set to use…

    Read More