Category Archives: SQL

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 Productivity, SQL, SQL Server, Uncategorized | 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

T-SQL to find High availability configuration of all databases in MSSQL Server

 TSQL to find list of all databases in MSSQL Server with Always-ON and mirroring configuration. #mssql#tsql #AlwaysOn #Mirroring #FailoverMode #HighAvailability

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

Add-on storage (Max storage choices) for Azure SQL Elastic Pools/ Databases – Great cost saving opportunity

If you have been using Azure SQL Elastic pools or databases (Platform As A Service – PASS), I strongly recommend to check your workload and validate Max storage choices! What change: Traditionally Each Azure Database and elastic pool had fixed … Continue reading

Posted in Azure, Productivity, SQL, Uncategorized, Useful Link | Tagged , , , , , , , , | Leave a comment

SQL Recursive CTE example

* Recursive CTE

Posted in Script, SQL, SQL Query | 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