SQL Server Logins vs Users: Where Authentication Ends and Permissions Begin

Have you ever connected successfully to SQL Server, only to receive a permission error when trying to access a database or run a query? This happens because connecting to SQL Server does not automatically give you access to every database or permission to perform every action. SQL Server uses logins and database users to manage … Read more…

Moving SQL Server to Azure SQL Database: Find the Dependencies Outside the Tables

Have you ever considered migrating a SQL Server database to Azure SQL Database, thinking that moving the tables, data, and stored procedures would be enough? The reality is that a successful database migration involves much more than moving database objects and their data. Even if everything is transferred successfully, your application may still fail because … Read more…

SQL Server Transaction Log Growth: Find the Reuse Blocker Before Shrinking

Have you ever noticed that a SQL Server transaction log file keeps growing, sometimes consuming several gigabytes of disk space, even though your database workload has not changed significantly? When this happens, the first reaction is often to shrink the transaction log file to reclaim disk space. However, shrinking the log without understanding why it … Read more…

How You Can Evaluate an AI Assistant with a Small, Useful Test Set

Have you ever built an AI assistant that performs perfectly during a demonstration, only to discover that it struggles when real users start asking questions? This is a common challenge in AI development. An assistant may answer a few test questions correctly, but that does not necessarily mean it can handle unclear requests, missing information, … Read more…

Python Database Credentials: Secure Your Connection Strings

Are you storing database usernames and passwords directly in your Python scripts? If so, this is a security practice you should stop. Hardcoding database credentials may seem convenient, especially when developing or testing a simple script. However, once that code is shared, committed to Git, or deployed to production, those credentials can become exposed and … Read more…

OPENJSON in SQL Server: Turn a JSON Payload into a Clear Data Contract

Have you ever received JSON data in SQL Server, only to discover that some fields are missing, values have unexpected data types, or the data does not match what your application expects? JSON is a flexible and popular format for exchanging data, but that flexibility can also introduce problems when processing it in a database. … Read more…

SQL Server Blocking vs Deadlocks: Diagnose the Right Problem

Have you ever experienced a situation where a SQL Server application suddenly becomes slow or stops responding, even though everything was working fine just a few moments ago? Two common causes of these problems are blocking and deadlocks. Although they both involve database locking, they are different problems and require different approaches to troubleshoot. Blocking … Read more…

SQL Server Statistics: Investigate the Estimate Before Rebuilding the Index

Have you ever noticed that SQL Server chooses a poor execution plan, even when the query seems straightforward and the appropriate indexes are in place? One possible reason is inaccurate row estimates. For example, SQL Server may expect a query to return just a few rows, but the query actually processes hundreds of thousands. This … Read more…

Using Query Store to Investigate a SQL Server Performance Regression

Have you ever experienced a situation where a SQL Server query runs perfectly one day but suddenly becomes much slower the next, even though nothing seems to have changed? This is a common performance troubleshooting challenge. Looking at the current execution plan can help us understand how SQL Server is executing the query now, but … Read more…

Entity Framework Core: Find N+1 Queries Before They Slow Down Your Page

Have you ever worked with an Entity Framework Core application where a page takes too long to load, even though each individual database query executes quickly? One possible reason is the N+1 query problem, a common performance issue where an application executes more database queries than necessary. For example, loading a list of twenty customers … Read more…

Prompting, RAG or Fine-Tuning? Start with the Failure You Need to Fix

Have you ever built an AI assistant that produces inaccurate or inconsistent answers, leaving you wondering whether you should improve the prompts, introduce Retrieval-Augmented Generation (RAG), or fine-tune the model? These are three common approaches to improving AI applications, but they solve different problems. Choosing the wrong approach can add unnecessary complexity, increase costs, and … Read more…