SQL SERVER – Finding User Who Dropped Database Table

Though I mainly focus on SQL Server Performance Tuning as my primary consulting engagement, there are moments when I am asked questions from my regular clients which are not related to SQL Server Performance and they still expect me to answer. I think it is totally fair, no one wants to go to find a new consultant for some simple questions. Recently my customer wanted to know who dropped the database table from their primary database.

Read More

SQL SERVER – Optimize Key Lookup by Creating Index with Include Columns

I love query tuning and performance tuning projects. In one of the recent Comprehensive Database Performance Health Check my client had a very interesting scenario where their queries were running pretty fast earlier but gradually started to run slow and eventually started to take over 10 minutes to execute. They reached out to me to tune their slow running query. While looking at the query execution plan, there is a big key lookup operation which was actually slowing down their query. I decided to create an index with include column on that table and resolve this issue.

Read More

SQL SERVER – The Older Way to Find Size of Index Using Deprecated sysindexes

Earlier this month, I wrote a blog post about How to Find Size of the Index for Tables? – Interview Question of the Week #198, in this I had explained the way to find the size of the index for the table. However, while I was writing the blog post, I was thinking about how I used to love sysindexes once upon a time. However, as now I focus on the new DMVs, I decided not to provide the script of the sysindexes.

Read More

SQL SERVER – Cluster Resource ‘AGName’ of type ‘SQL Server Availability Group’ in Clustered Role ‘AGName’ Failed

I never leave my customers alone when they are having an issue with something which I helped them. Typically, I help customers in creating POC and deploying AlwaysOn Availability Groups. Just the other day while doing the Comprehensive Database Performance Health Check, I came across error related to cluster resources. 

Read More

SQL SERVER – You Are Not Logged on as the Database Owner or System Administrator

Every day I spend a good amount of time with my regular and new clients, helping them with SQL Server Performance Tuning issues. Today, in this blog, I will discuss a situation faced where I was engaged in Comprehensive Database Performance Health Check. I saw below message on client’s SSMS while he was trying to create a table – You are not logged on as the database owner or system administrator.

Read More