As database administrators, it's crucial to monitor and analyze CPU usage across different databases in SQL Server. By understanding which databases consume the most CPU resources, we can better optimize performance and m…
When working with SQL Server, it's essential to understand the different statuses a SPID (Server Process ID) can have. These statuses indicate the state of a session and help in diagnosing performance issues or understanding…
As a SQL Server DBA, managing user access and permissions is crucial. Often, users belong to Active Directory (AD) groups that grant them access to the SQL Server instance. Knowing which users belong to which groups helps you…
While the SQL Server Management Studio (SSMS) offers a graphical interface for configuring Database Mail, T-SQL provides detailed insights into the configuration through various system stored procedures and views. Here's ho…
While attempting to attach a database on one of my test servers, I encountered an error. Recognizing the potential value in sharing solutions to common database issues, I've decided to document the steps to troubleshoot and r…
Slow running queries can drag down application performance and degrade user experience. As a DBA, it's important to monitor and optimize long running SQL statements. In this post, I'll demonstrate how to find queries …
The SQL Server Query Store is an incredibly useful feature for monitoring and troubleshooting query performance issues. One of the handiest aspects of the Query Store is the ability to easily retrieve execution plans and quer…
The Query Store is a feature in SQL Server that collects and stores information about queries that are executed. This information can be used to troubleshoot performance problems, identify queries that are causing problems, a…
UDL file for SQL connectivity check A UDL (Universal Data Link) file is a text file that stores connection information for a data source. UDL files can be used to test connectivity to a variety of data sources, including SQL Serv…
Azure SQL Managed Instance provides a robust environment for running SQL Server workloads in the cloud. However, it does come with certain limitations, one of which revolves around the retention of SQL Agent job history. In t…
In the world of database management, identifying queries responsible for high CPU usage is paramount for maintaining optimal performance. This article will guide you through two essential SQL statements that can help you pin…
In the realm of database management, ensuring robust security measures is paramount. As a dedicated SQL enthusiast, I recently stumbled upon an incredibly useful SQL query on Stack Overflow. While I didn&…
SQL Server Availability Groups (AG) provide high availability and disaster recovery solutions for critical databases. Understanding the history of failovers in an AG is crucial for tracking changes in primary and secondary no…
In this blog post, we will explore a useful PowerShell script that allows you to execute TSQL queries and send the results via email. The script is versatile and can work with any type of TSQL query. It also provides options to…
In SQL Server, TempDB is a system database used to store temporary objects such as temporary tables, table variables, and other internal objects created during query processing. It is essential for managing sorting, groupin…
We'll explore how to convert UTC (Coordinated Universal Time) to BST (British Summer Time) using T-SQL. Daylight Saving Time (DST) adjustments are crucial for handling time changes in regions that observe it. We'll d…
In today's blog post, we'll explore how to automate the population of UK holiday data into a SQL Server database using PowerShell. We'll walk through the code and discuss how it retrieves holiday information from …