All Articles logicalfilename-600x232

SQL SERVER – Get List of the Logical and Physical Name of the Files in the Entire Database

One of the most popular questions I often receive is why do I like to do consultation – my answer is very simple – it gives me an opportunity to learn continuously learn new things from my clients. Here is a script which I have built during my recent Comprehensive Database Performance Health Check. To perform one of the performance tuning tasks we needed a list of all the logical and physical names for the files for every single database on the SQL Server Instance. Here is the script which can list all the physical and logical name of the files along with their type as well.

Read More
All Articles keylookup1-600x420

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
All Articles flipresult-600x1308

Puzzle – Datatime to DateTime2 Conversation in SQL Server 2017

Earlier last week, I was presenting various questions about SQL Server 2017 at PASS in Seattle. However, during one of the session, I was fortunate to meet SQL Server Expert Christopher Savage. He shared a very interesting puzzle with me. I have been trying to solve the puzzle for a while, but I have no answer for it. Let us see the puzzle about DateTime2 Conversion in SQL Server 2017. 

Read More
All Articles bertpinal-600x338

Video – Bert & Pinal Troubleshoot a Slow Performing SQL Server

Earlier last week, I had the opportunity to attend my 10th SQL PASS. Yes, It has been 10 years since I have been visiting the PASS conference. This year, I had the opportunity to present 1 pre-con, 2 general sessions, 1 lightning talk. I really had a busy time at SQLPASS but along with the sessions, the highlight of the event was a video I recorded with Bert where we discussed troubleshoot a Slow Performing SQL Server.

Read More
All Articles pro-corr-01-600x363

SQL SERVER – Initializing the FallBack Certificate Failed With Error Code: 1, State: 20, Error Number: 0

One of my clients came with an issue with SQL Server startup. As per them, they just changed the password of SQL Server Service account using the configuration manager. In this blog we would learn about how to fix Initializing the FallBack certificate failed with error code: 1, state: 20, error number: 0 during SQL startup.

Read More
All Articles SortOrder0-600x152

Does Sort Order in Index Column Matters for Performance? – Interview Question of the Week #199

Question: Does Sort Order in Index Column Matters for Performance?

Answer: Wow, it has been a long time since I have heard this question and the matter of fact, I have never blogged about this subject on this blog. I have received this question during my recent Comprehensive Database Performance Health Check.

Read More