Tag Archives: SQL Server

Fix: SQL Server – using X logical processors based on SQL Server licensing, not using all processors

I had an experience where a server with 36 cores is using only 20 cores for SQL Server 2012. It was identified that Enterprise Edition is being used which limit SQL to use only 20 CPUs. Research indicates that the … Continue reading

Posted in Uncategorized, SQL, Productivity, SQL Server | Tagged , , , | Leave a comment

What is azure sql database elastic pool split instance problem

Azure sql database elastic pool split instance problem is a very rare phenomena which could impact resource usage metrics of elastic pool. In this post I will cover how resource metrics are impacted, sample monitor, example of an impact. How … Continue reading

Posted in Azure, knowledge, Productivity, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , , , , | Leave a comment

What are default Index Maintenance settings in Ola hallengren maintenance solution

Summary: When Fragmentation < 5%, No maintenance When Fragmentation >= 5% and Fragmentation < 30 %; index ReOrganize When Fragmentation >= 30%; index Rebuild (If Supported online or Offline) Note: This is the default and regular scenario. check reference for … Continue reading

Posted in SQL, SQL Server, Uncategorized | Tagged , , , , | Leave a comment

Validate and delete duplicate records from MSSQL table

I had a situation where Index creation failed and business wants to delete duplicate entries immediately from a specific table. I had to validate the columns which are unique and which had different values. Following is easy script to validate … Continue reading

Posted in SQL, SQL Query, Uncategorized | Tagged , , , | Leave a comment

Address High CPU on SQL Server

Following are the guidelines to troubleshoot High CPU scenario in MSSQL Server and fix the problem. 1. Identify running SQL statements taking more CPU 2. Find sql_handle, using SQL handle find average execution time in ms, Number of executions, and … Continue reading

Posted in Execution Plan, Performance, SQL, SQL Server, Uncategorized | Tagged , , , | Leave a comment

Fastest way to fix MSSQL Database with Suspect mode

I had a situation where multiple databases (50+ Databases) changed to Suspect mode. Simple solution: (assume the DBs are in Server-A, Availability group and Server-B is configured as secondary server) * Fail over the availability group to Server-B * Resume … Continue reading

Posted in SQL, SQL Error, SQL Server, Uncategorized | Tagged , | Leave a comment