Improvements To The SQL Server Availability Group Failover Detection Utility

Rob Sewell has a few improvements to the SQL Server Availability Group Failover Detection Powershell function:

Archive the data for historical analysis

One of the production DBAs pointed out that having gathered the information, it would be useful to hold it for better analysis of repeated issues. I have added an archiving step so that when the tools runs, if there is already data in the data gathering folder, it will copy that to an archive folder and name it with the date and time that the cluster log was created as this is a good estimation of when the analysis was performed. If an archive folder location is not provided it will create an archive folder in the data folder. This is not an ideal solution though, as the utility will copy all of the files and folders from there to its own location so it is better to define an archive folder in the parameters.

There are several improvements in here, so check them out.

Related Posts

Quick Thoughts on Dot-Sourcing in Powershell Modules

Cody Konior wants to speed up module loading: One of the more heated ideas¬†is that you should combine all of your scripts into a massive file and execute it once instead. Currently¬†dbatools uses a mix of these techniques in great detail and to great success. I don’t want to use a single file because I […]

Read More

Automating Command Line Sessions with Powershell

James Livingston shows us how to redirect the standard in flow with .NET, using Powershell as the example language: Command Line Interface (CLI) tools can be very useful for interacting with certain applications. However, some CLIs do not let a user pass in parameters which makes it difficult to automate. Instead, they lock a user […]

Read More

Categories

December 2018
MTWTFSS
« Nov Jan »
 12
3456789
10111213141516
17181920212223
24252627282930
31