SQL SERVER – Set AUTO_CLOSE Database Option to OFF for Better Performance

As many of you know, I am an indecent SQL Server Consultant, who purely focus on SQL Server Performance. Every single day, I keep two slots each hour long available for users who need my help urgently. I never ever pre-book them because, I believe it is critical to help people who needs help NOW. Well let us learn in this blog post about how I recently helped a customer to improve performance by turning off AUTO_CLOSE Database Option.

Read More

SQL SERVER – How to INSERT or SELECT Copyright Special Characters in SSMS?

I answer every email I receive in six hours and that is why sometimes I end up working over 18 hours in a day. However, sometimes I receive emails such that makes me wonder, how come I do not know some very simple stuff. Here is for example – today I received email where user asked how to INSERT or SELECT Copyright Special Characters in SQL Server. Trust me, in my early career, I used to know the answer to this, but I was not able to answer the user immediately. After quick googling, I was able to find out the appropriate character string.

Read More

SQL SERVER – 2016 – Wait Stats and Queues Script Updated – Identify Resource Bottlenecks

NOTE: This script will just work fine with earlier version of SQL Server (2008, 2012, 2014) along with SQL Server 2016. It will give the expected results in all the SQL Server versions. This script will help you identify resource bottlenecks in your SQL Server.

A few years ago, I wrote the script which will help us identify SQL Wait Stats and Queues. It is a very popular script. You can find the link to the script over here: Introduction to Wait Stats and Wait Types. However, it has been a long time since I wrote that script and it was written for SQL Server 2008.

Read More