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