Tag: Script Library

SQL Server resource_semaphore waits

How to Find Queries Causing RESOURCE_SEMAPHORE Waits in SQL Server

The resource_semaphore wait can have devastating consequences for SQL Server performance. This wait essentially means that some of the queries in your workload have memory grants that are larger than the memory for the server can support. When that happens, the SQL Server feels like it is frozen and unresponsive. Queries are likely running, but…
Read more

IT decisions

Why Quiet Reflection Leads to Better IT Strategy Decisions

Last Saturday, I woke up before dawn to a quiet house. My family was still asleep, as I’m the only morning person in our household. The Christmas tree lights cast a warm glow across the room, and I was alone with my thoughts and a hot cup of coffee. No urgent emails, no fire drills,…
Read more

How to Enable Query Store in SQL Server

How to Enable Query Store in SQL Server: A Step-by-Step Guide

In my previous post about Query Store, I wrote about the four key benefits to enabling Query Store. Now that I’ve convinced you to turn it on, how do you do that? One thing to point out is that in SQL Server 2022 and above, when creating a new database from the SSMS GUI or…
Read more

Query Store SQL Server

4 Key Performance Benefits of Enabling Query Store

Query Store has been around since SQL Server 2016, but its full potential often goes untapped. Some companies were initially wary of it after some edge case problems arose during its initial rollout. However, since its initial release, Query Store has undergone numerous enhancements and is rapidly establishing itself as one of the most significant…
Read more

SQL Server Database Mail Troubleshooting

How to Troubleshoot SQL Server Database Mail Issues Using Built-In View

Sending emails from a SQL Server via sp_send_dbmail is common, but troubleshooting problems can be frustrating. Fortunately, SQL Server logs every email attempt, making it easier to find and fix issues. View All Messages Processed By Database Mail The sysmail_allitems view shows every email that Database Mail has tried to process, whether it was successful…
Read more

Tail-Log Backup SQL Server

Why Tail-Log Backups Matter for SQL Server Recovery and Migration

In previous posts, we’ve covered the more routine types of backups available within SQL Server — full, differential, and transaction log backups. While you may not use them as often, you should also be aware of tail-log backups when managing SQL Server. Tail-log backups can help in two scenarios. What is a tail-log backup? Tail-log…
Read more

Undermanaged SQL Servers can lead to frustration for both your customers and your team.

The Costs of Undermanaged SQL Servers for Financial Institutions

Banks and credit unions rely on SQL Server databases to power transactions, portals, reporting, fraud detection, and core systems. Despite this, many institutions end up undermanaging or even overlooking these critical systems. The result? Performance lags, security vulnerabilities, and unplanned downtime that can cost far more than most institutions realize. If you’re responsible for operational…
Read more

How to Encrypt Sensitive Text in SQL Server with ENCRYPTBYPASSPHRASE

How to Encrypt Sensitive Text in SQL Server with ENCRYPTBYPASSPHRASE

Storing sensitive information in a database, like passwords or social security numbers, is common practice. However, storing them securely is less common. Unfortunately, one of the most typical approaches is to store sensitive information in a table as clear text. That means that anyone with access to that table can see all of that sensitive…
Read more

Prevent SQL Server Outages by Monitoring Transaction Log Growth

Prevent SQL Server Outages by Monitoring Transaction Log Growth

I’ve lost count of the times I’ve been called after hours due to a drive filling up. The usual culprit? Transaction file log growth. Monitoring the growth of your SQL Server transaction log files is crucial for maintaining database performance and ensuring system reliability. Unchecked transaction log growth can lead to disk space issues and…
Read more

Scripts SQL Server Logins

Useful Scripts For SQL Server Logins and Permissions

Since security and permissions are a big part of a DBA’s job, it’s important to be able to find out things like who has elevated login permissions or when a login was last used. Here are a few queries to help you check your server and database access. Most of these scripts are based off…
Read more