AlwaysOn_health Extended Event Session

The AlwaysOn_health XEvent session is installed by SQL Server by default, and started by the Create Availability Group wizard when a new availability group is created. AlwaysOn_health Extended Event Session The xEvent session collects events triggered by events directly affecting AlwaysOn availability group like; AlwaysOn errors AlwaysOn state transitions AlwaysOn DDL executed to create, drop, […]

Read more
AlwaysOn Dashboard uses System Policies

The AlwaysOn Dashboard is an excellent tool in SQL Server Management Studio that allows you to monitor Replica status, Availability Group status, and Database status. But, if you are wondering what the Dashboard uses internally to monitor the AlwaysOn health, so here is the answer – It utilizes system policies for monitoring AlwaysOn health. Policy […]

Read more
Why Availability Databases Are Not Synchronizing?

If you are working on SQL Server Availability Group Databases, you may have seen that Availability Group is online but at-least one availability database at the primary or the secondary is not synchronizing. In the blog, we are going to explore how to find what has interrupted synchronization between availability databases on the primary and a […]

Read more
Schedule an Extended Event to run at a Specific Time

When you are using the extended event to capture some data for troubleshooting purpose, you may want to start or stop it at a specific time. Unfortunately, the Extended Event feature doesn’t provide you the option to schedule it. But, it can easily be accomplished by using “ALTER EVENT SESSION” T-SQL code and SQL Server […]

Read more
Find Query with Implicit Conversion in the Plan Cache

In my previous blog, I discussed about “Which are the queries using a particular index or table?“. Today’s post, I am going to show how you can find all queries with Implicit Conversion in SQL Server. What is an implicit conversion? Implicit conversions occur whenever data with two different data types are being compared. Implicit conversions will often harm […]

Read more
Which are the queries using a particular index or table?

The DMV sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats give you excellent detailed information about how the indexes are being used and what operations are occurring (select, insert, update, delete) in the database. But they don’t tell you a particular index or table is being used by which all the queries. So, when you want to tune the existing […]

Read more
How to Perform Database Hack-Attach

This blog demonstrates attaching a database on the SQL Server Instance which already has the same name database up and running. Scenario: Suppose, you got a hardware migration activity. The migration activity involves moving the databases from old hardware to new hardware. Let’s say the server got only one big database to be migrated. During […]

Read more
Finding Untrusted Foreign Keys and Constraints

In the previous blog, we discussed the Foreign Keys Constraints and how the CHECK Constraints are useful to verify the data that goes into your tables. But, sometimes when you need to load a lot of data quickly, SQL Server allows you to temporarily disable any CHECK or FOREIGN KEY constraint in order to improve performance. […]

Read more