Category Archives: Uncategorized

Powershell Workflow for Runbooks, Inline Script

Powershell workflow is the best way to program parallel processing using Powershell and/or in Azure run books. Though the syntax is similar, there are few differences you need to be aware of. Start with below link when you create your … Continue reading

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

DBATools.IO – Powershell for SQL DBAs

DBATools.IO was one of the best things I started using in 2017 and I wanted to master this in 2018! https://dbatools.io/functions/ includes the list of all commands in dbatools module! Start using it if you have not started already.

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

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