TSQL

Per-Database CPU Usage in SQL Server

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…

View Database Mail Configuration in SQL Server with T-SQL

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…

Find a specific query in the Query Store?

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…

How to retrieve the Query Store ID of a Session ID in SQL Server?

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…

How to persist SQL Agent job history in Azure SQL Managed Instance

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…

Load More
That is All