Category Archives: Uncategorized

SOLUTION – Write-EventLog : The source name X does not exist on computer “localhost”

While attempting to create a new event log using write-eventlog cmdlet you may hit this error if the Source is not already registered. New-EventLog can be used to add anew source, following is the example

Posted in Uncategorized | Leave a comment

SQL Job history – Getting end time from sysjobhistory

Run_date, run_time, run_duration are stored in int format in sysjobhistory table, not user friendly. For a quick solution I had to pull the history from last X hours. This simple TSQL helped to find end time of the step!

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

QueryStore – Regressed queries based on execution count

Handy TSQL statement to find gergressed queries on a given time based on execution count. I had a scenario to validate if application is executing any statements more frequently on a given time. Following SQL can be used to find … Continue reading

Posted in knowledge, Performance, Script, SQL, SQL Query, Uncategorized | Tagged , , , , , | Leave a comment

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

Search Windows Server patches using KBXXXX / Microsoft Security Update Guide

Server http://www.catalog.update.microsoft.com using KB number to find the patch information and download link. Security Update Guide: https://portal.msrc.microsoft.com/en-us/security-guidance Example: http://www.catalog.update.microsoft.com/Search.aspx?q=KB4489882

Posted in Productivity, 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