How to Identify Slow Running Queries using SQL Server Profiler

CREATING A TRACE TO IDENTIFY SLOW RUNNING QUERIES

SQL Server Profiler is an interface to create and manage traces and analyze and replay trace results. Events are saved in a trace file that can later be analyzed or used to replay a specific series of steps when trying to diagnose a problem.
In this post we will see how to create a trace to capture slow running queries using profiler.

Configure SQL Server Always On Availability Group on Windows and Linux (Cross Platform)

Overview

This post demonstrate the steps to create an AlwaysOn Availability Group (AG) with one replica on a Windows server and the other replica on a Linux server. This configuration is cross-platform because the replicas are on different operating systems. This configuration can be used for migration from one platform to the other or disaster recovery (DR). This configuration does not support high-availability because there is no cluster solution to manage a cross-platform configuration.

Configure SQL Server Always On Availability Group on Windows and Linux (Cross Platform) - Part 1

Install and configure SQL Server 2019 on both the nodes


Step #1: Install SQL Server

Install SQL Server on Windows Server
Install SQL Server 2019 on Windows Server 2016 and set mixed mode authentication.

Install SQL Server on Linux
Install SQL Server 2019 on Linux. For instructions, see Install SQL Server on Linux.

Configure SQL Server Always On Availability Group on Windows and Linux (Cross Platform) - Part 2

Create the SQL Server 2019 Always On Availability (AG) Group

The steps to create the AG are the same as the steps to create an AG for read-scale workloads. The AG cluster type is NONE, because there is no cluster manager.

Configure SQL Server Always On Availability Group on Windows and Linux (Cross Platform) - Part 3

Test and verify both the ways to failover the primary replica

There are two ways to fail over the primary replica in an availability group with cluster type NONE.
    -  Forced manual failover with data loss
    -  Manual failover without data loss

Configure Critical Email Alerts in SQL Server

SQL Server has alerts that are more important based on the severity of the error. When an error is raised by the SQL Server Database Engine, the severity of the error indicates the type of problem encountered by SQL Server.

Setting up Email Alerts for SQL Server Deadlocks

There are two main types of Alerts that can be configured within SQL Server. Event Alerts which can be used to track actions within SQL such as critical failures or failed login attempts. Performance Condition Alerts which are more robust and can be used to alert on specific performance related issues.
This post mainly focused on triggering an email alerts when a deadlock occurs on SQL Server instance.

How to Configure Database Mail in SQL Server

Database Mail is an solution for sending e-mail messages from the SQL Server Database Engine. Using Database Mail, database applications can send e-mail messages to users. The messages can contain query results, and can also include files from any resource on the network. For example, if an automation process like jobs, replication, and database log-shipping fails or there are alerts raised then SQL Server can use this feature to notify the administrators or operators.