Tag: DBA Tools

Tools commonly used by SQL Server DBAs for administration, monitoring, troubleshooting, automation, and operational workflows.

  • Open SSMS as a Different Domain User

    When working in corporate SQL Server environments, you will often need to connect using a different Active Directory domain account. Common reasons include: SQL Server Management Studio (SSMS) does not allow switching users inside the connection dialog. To connect as another user, you must launch SSMS itself using that account. This post covers the two…

  • sqlcmd Examples for SQL Server

    sqlcmd is a command line utility for connecting to SQL Server and executing Transact-SQL without a GUI. It is commonly used for automation, scripting, remote administration, and incident response, especially in environments where SSMS is unavailable, inappropriate, or too heavy. This post covers sqlcmd usage from a DBA perspective, how to find or install it,…

  • Install and Update SQL Server Management Studio (SSMS)

    SQL Server Management Studio (SSMS) is the primary management tool for SQL Server and Azure SQL platforms. It is also the official download location and update path for SQL Server Management Studio going forward. In recent releases, SSMS has changed significantly, not in how it looks, but in how it installs, updates, and enforces connection…

  • How to Show Line Numbers in SSMS

    In modern versions of SQL Server Management Studio, line numbers are enabled by default. If you are running SSMS 21 or newer, you will already see line numbers in query windows without changing anything. Older versions of SSMS did not enable them by default, which is why many guides still focus on “turning them on”.…

  • Script: I/O Usage by Database

    This script returns total read and write activity per database based on file-level I/O statistics. It helps identify which databases are generating the most disk activity on the instance. This is commonly used during performance troubleshooting, storage pressure investigations, and workload analysis. The Script Example Output The result set shows one row per database, including…

  • Script: Check Worker Threads and Active Sessions

    This script shows the current SQL Server worker thread count along with all active sessions and requests. It provides a live view of CPU usage, blocking, waits, running commands, and transaction activity. This is a practical script for performance troubleshooting when an instance appears busy, unresponsive, or under pressure. The Script Example Output The first…

  • Script: Top Wait Statistics

    This script returns the top wait types since the last SQL Server restart or wait statistics clear, excluding common idle and background waits. It provides a quick high-level view of where the instance is spending time. This is often the first script run during performance investigations to identify whether the primary pressure is related to…

  • Script: Get SQL Server Agent Job Overview

    This script returns an overview of all SQL Server Agent jobs on an instance, including job category, owner, whether the job is enabled, the last run start time, last run duration, and the next scheduled run time. It’s a practical check when reviewing inherited environments, validating job ownership, identifying disabled jobs, or confirming schedules after…

  • Script: Get SQL Server Services Information

    This script returns details about the SQL Server and SQL Server Agent services running on an instance. It shows the service name, process ID, startup type, current status, service account, and whether instant file initialisation is enabled. This is a useful check when validating new builds, reviewing service accounts, or troubleshooting startup and permission-related issues.…

  • Script: Get Database Sizes and Free Space

    This script returns file-level size and free space information for all databases on a SQL Server instance. It shows how much space is allocated, how much is used, and how much free space remains inside each data and log file. This is a go-to check when reviewing storage usage, investigating unexpected growth, or validating capacity…