SQL SERVER – The NOLOCK Question – Notes from the Field #117

[Note from Pinal]: This is a 117th episode of Notes from the Field series. Everytime I go to do performance tuning consultancy, one thing annoys me and makes me angry. The usage of NOLOCK hint. I think without any argument, this is one of the most abused query hint in the SQL Server universe. Lots of people treat NOLOCK as a silver bullet of performance tuning and that is unfortunate. There is a special purpose of how NOLOCK should be used and what is the end goal of it.

In this episode of the Notes from the Field series database expert Stuart Ainsworth explains about NOLOCK and its best practices. Trust me, you do not want to overuse NOLOCK hint as it can just impact your database integrity negatively.

Read More

SQL SERVER – syspolicy_purge_history job failing step: Erase Phantom System Health Records

Getting back to consulting mode has got my newer clients and bigger challenges. Not only that I am seeing interests for some of the greatest and latest versions, but some clients are sitting on an older version of SQL Server requiring some serious help for trivial issues. One of my clients has asked to consult for a quick error message troubleshooting in the recent past. Since it was an interesting one about syspolicy_purge_history job, I am sharing it via the blog.

Read More

SQL SERVER – Setup Closed with Exit Code 0x80004005

Recently I was trying to help one of my clients to install Service Pack 3 for SQL Server 2008 R2 instance. Nothing was coming up when we were hitting setup.exe. I looked into my own blog and found Installation Log Summary File Location – 2012 – 2008 R2. But there was no file getting generated. I looked around of MSDN and found: https://docs.microsoft.com/en-us/sql/database-engine/install-windows/view-and-read-sql-server-setup-log-files?redirectedfrom=MSDN&view=sql-server-ver15. The reason was there was exit code 0x80004005.

Read More

Interview Question of the Week #061 – How to Retrieve SQL Server Configuration?

I have observed this question in the interview question few days ago. I had a fun time to see candidates failing to answer this question. The most common answer candidate gave us was that they will right click on the server and see the properties. Well, that option will not give all the details which actual question intended. Let us see the question:

Question: What is the best way to see all the options set for your SQL Server programmatically?

Answer:

Read More

SQL SERVER – Management Studio – Changing Status Bar Location

To error is human and sometimes the errors / mistakes we make can easily put our jobs at stake. Such horror stories are something I keep hearing from people and they are super cool in a way because you learn from their experiences. In a recent corridor conversation with a friend, he said how cool he found my blog on: SQL SERVER – Color Coding SQL Server Management Studio Status Bar. He personally felt this was a cool thing. But he said even after that, it is sometimes difficult because the status bar location is at the bottom. I asked what is your screen resolution – he replied (2560 x 1440).

Read More