T-SQL Script to list foreign key relationships

In this article, we will see T-SQL scripts to list foreign key relationships between tables. What is Referential dependency ? Referential dependency is a constraint between two tables in a relational database that ensures data consistency. To establish a referential dependency, you define a foreign key on a table that refers to the primary key … Read more

Find Drive Letters from EBS Volumes IDs

On AWS portal , we see Volume IDs of EBS volumes. However on EC2 Machine, we see disk names. Sometimes, we need to know which disk name is associated with which volume ID. In this article, we will talk how to find drive letters from EBS volume IDs. Before we start, Please go through article … Read more

Install and Configure AWS CLI on Windows EC2 Machine

Here are step-by-step instructions: Installation of AWS CLI Validation of AWS CLI setup To check the version of the AWS CLI installed on your Windows machine, open a command prompt or PowerShell terminal and run the following command: aws –version This will display the version number of the AWS CLI installed on your machine, along … Read more

Accelerated Database Recovery in SQL Server

What is Accelerated Database Recovery SQL Server 2019 introduced Accelerated Database Recovery (ADR) as a new feature. ADR reduces the time it takes to recover a database from a crash or other failure. It accomplishes this by introducing a new recovery mechanism that greatly reduces the amount of time it takes to roll back transactions … Read more

Always On vs. Read Scale Availability Groups

In this article we will try to understand differences of SQL Server Always On Availability Groups vs. Read Scale Availability Groups. Designing HA/DR Solution and Customer’s Question: Recently, we were working on designing SQL Server HA/DR database solution for one of our customer. After considering customer’s requirement, we suggested a multi subnet three node Always … Read more

Fixed: SQL Server Query Performance Issue

Troubleshooting SQL Server query slowness issue. Query optimization through parameterization. Fixing duplicate plan issue.

Guide to handle high CPU caused by deadlocks

We were working for a customer who was facing below issues on MS SQL Database server: Initial Approach: Issue Identification: Above things helped very little so we started further investigation of deadlocks and execution plans of high CPU queries. We identified below issues: 5. Winner query acquired key lock on entire non clustered index due … Read more

SQL Server TDE, Encrypted Backup Interview Questions

Recently we worked with one of customer who wanted to implement TDE and Encrypted backups on his production SQL Servers. He had so many questions on encryption and decryption process. Some questions might look silly but we had to test things to be able to provide answers. Refer existing articles for TDE and Encrypted backups: … Read more

ola hallengren index optimize not optimizing indexes

We had deployed ola hallengren maintenance solution for one of the customers and scheduled all the jobs. Customer mentioned to us that Index Optimize job ran fine, however he could still see that there were many indexes with fragmentations percentage around 90% and more. He even sent report for this as evidence. Then we went … Read more

SQL Server Encrypted Backup and Restore

SQL Server encrypted backup is a feature of both standard and enterprise edition in SQL Server 2019. You can refer below link for more details: https://learn.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2019?view=sql-server-ver15 Taking encrypted backups and restoring those backups on another SQL instance requires some additional steps to be followed. Take Encrypted Backup Above encrypted backups could be restored on same … Read more