Category Archives: Uncategorized

SQL Alwayson Preferred Node workaround, Fallback script

We have Always-On configured between Node-1, Node-2 with Auto Failover enabled. Unfortunately one minor functionality was partially impacted when AG is primary on Node-2. Business is very particular about not changing it to Manual Failover mode. End up creating a … Continue reading

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

Availability Group Fail Over date/time – TSQL

I have been using this quick script to verify AG Status Change details from error log.

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

Error Creating Availability Group – Error: 41042 (Fixed)

While Building 50 Servers with 10 AG Groups in each Server we had to uninstall SQL and re-install again to address one of the server configuration issue. While re-installing we had challenges creating the availability group. Final solution is to … Continue reading

Posted in High Availability, SQL, SQL Error, Uncategorized | Tagged , , , , | Leave a comment

Interesting observation with DATETIMEOFFSET data type in SQL

Calculating daily max values of a table will be different if you are using/storing the data in DATETIMEOFFSET format. Basic difference is, while comparing the data between DATETIMEOFFSET and DATE (or DATETIME), DATETIMEOFFSET value will be converted to UTC and … Continue reading

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

Onenote weekly backup

I have created Onenote on sharepoint, shared it across virtual team. All members of the project were actively using this. To my horror, I realize one of the section was accidentally deleted 😦 By default Onenote will be backed up … Continue reading

Posted in knowledge, Productivity, Uncategorized | Tagged , , | Leave a comment

Conditional Formatting – Excel

Simple tip on using Conditional formatting. This sample is to format a cell if it exceeds certain threshold (which is a different column on the same row). 1. Identify first row, first column where the formula needs to be created. … Continue reading

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

Frequently used Azure powershell commands

Few of my frequently used powershell commands on Azure Ref: https://docs.microsoft.com/en-us/azure/search/search-manage-powershell

Posted in Azure, Powershell, Uncategorized | Tagged , , , | Leave a comment