Blog Posts

  • SQL Server Performance Troubleshooting Scripts

    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 latency and 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…

    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. For Domain users in SQL, this sync’s automatically and we just need to create the…

    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


  • Removing Quotes from all CSV Files in a Directory

    Managing CSV files often involves cleaning up data before processing. A common task is removing unwanted quotation marks from the contents of CSV files. I wrote a blog post on how to remove quotes from a single CSV file using PowerShell some years ago, which I have just…

    Read More


Categories

AWS
DBA Stories
Linux
MySQL
Other
Postgres
PowerShell
Redshift
SQL Server
Windows Server

Tags

Always On Availability Groups (AAG) (3) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (72) Database Backups & Recovery (13) Database Mirroring (2) Deleting Data (1) Error Messages (4) Git Commands (5) Importing & Exporting Data (2) Linked Servers (3) Linux Admin (2) Logging & Monitoring (1) Measuring Databases (10) Microsoft Patching (2) PowerShell Scripts (1) SQL Server Agent (4) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (14) SQL Server Network Connectivity (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (5) SQL Server Permissions (1) SQL Server Processes (5) SQL Server Replication (2) SQL Server Scripts (13) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (19)