All Articles alwaysonreplica-600x282

SQL SERVER – Scripts to Overview HADR / AlwaysOn Local Replica Server

Today, I have received a very interesting script from SQL Server Expert Dominic Wirth. He has written a very helpful script which displays a utilization overview of the local availability group replica server. The overview will contain the number of databases as well as the total size of databases (DATA, LOG, FILESTREAM) and is group by following two categories

Read More
All Articles wood-1

SQL SERVER – Rebuild Index Job Failed – Error: 9002 – The Transaction Log for Database ‘PinalDB’ is Full Due to ‘LOG_BACKUP’

Sometimes we have an error in SQL Server job history which are not very accurate to find the cause of an issue. In this blog we would explore a situation where rebuild index job was failing with error 9002 – The transaction log for database ‘PinalDB’ is full due to ‘LOG_BACKUP’.

Read More
All Articles linenumber1-600x402

SQL SERVER – SSMS – Enable Line Numbers in SQL Server Management Studio

During the Comprehensive Database Performance Health Check, I never take access to the server. We always connect via GoToMeeting or WebEx. Due to the security issue, I always prefer that I never log in to the server directly but I always like to teach and guide DBAs who are working with me on another side, how to do SQL Server Performance Tuning. However, while I do this, I face often challenge when I am looking at the screen and tell DBA on the other side to change any specific part of the query. This is when I believe the trick of enabling line numbers in SSMS comes in handy.

Read More
All Articles sqlgovernor-600x288

SQL SERVER – Automated SQL Server Consolidation and Right Sizing – Save 50% Data Platform Costs

If you have ever needed to implement a large-scale data platform migration or consolidation project, you are definitely familiar with many of the pain points faced during the process. Firstly, manual data collection is very tricky to arrange and demands lots of work. Secondly, the planning of the capacity is a complex and detailed process – you need to take all the performance counters, their threshold levels and SLA’s, trends, different server benchmarks and such into account. When it comes to the consolidation effort, it is impossible to try to rearrange the SQL Server instances into a most optimal target server setup with manual work. All this takes a lot of time and is prone to human error.

Read More
All Articles nolock-600x343

SQL SERVER – Applying NOLOCK to Every Single Table in Select Statement – SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

The other day, during SQL Server Performance Tuning Practical Workshop, I walked into a very interesting situation. While tuning a query we had a situation when we had to check if the query is locked during the execution of not. To test our theory out we had to put a nolock hint for every single table of the long query. However, it was no way possible to do so as the Stored Procedure was super huge and involved over 90 tables and 14 views in multiple SQL Statements. It was indeed a huge challenge for a developer team to modify that SP. If you ever face such situations, you should not stress out. There is a much simpler way to read uncommitted data.

Read More