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

SQL SERVER – Puzzle – Playing with Datetime with Customer Data

I am preparing for a professional tour of Europe wherein I am planning to meet a number of customers as part of consulting and performance tuning assignments that I have agreed in early October. I am already swamped with the requests and I think the learning experience is second to none when one gets to work on global projects. Let us an interesting puzzle.

Read More

SQL SERVER – Columnstore Index Cannot be Created When Computed Columns Exist

Explorations working with SQL Server never stop and I get an opportunity to learn something every other day. Today I thought of bringing pout some learning that happened to me by accident. As I was not sure and assumed certain things, these came as a surprise learning for me. So let us see what is the issue at hand, which is about Columnstore Index and Computed Column.

Read More

SQL SERVER – Understanding How to Play With Row Constructor

Every version of SQL Server brings in something new that challenges our understanding of how the software product works. For me, working with SQL Server is quite refreshing and fulfilling because every single day there is something about the product that I discover and learn. There are tons of professionals who are working on this product and they push the limits of use and bring interesting use cases which I get to learn. Let us learn about Row Constructor.

Read More

How to Find Recent Executed Queries in SQL Server? – Interview Question of the Week #087

Interviews are fun. Most of the time the interviewer has all the interesting questions, but I often come across a few individuals who stomps the interviewer. I was recently called by one of the organizations where I regularly help with their hiring process. They were stumped by interviewing candidates with one of the questions related to recent executed queries. Let us see the question and its answer.

Read More