Day 2

Another day, another block of text.

Worked on a script at work today to perform automatic failover of the databases. The idea is that the servers on which the databases are hosted have a planned upgrades each month for windows patches and stuff like that. (As an aside, I still have no idea why the databases are hosted on Windows. Is MSSQL better on Windows? Need to check this.) I think I went too deep into it, the initial PoC was just a 10 liner which did the failover at the end of the script. (8 of those lines were variable declarations, useless echo commands & comments) By the time I was done with it, it ended up turning out to be a 100 line script which checked the health status & primary replica for each availability group. Pretty neat and it was fun to implement. I usually don't get to work on database systems, in a personal capacity, so doing it at work is fun, sometimes. I initially tried mapping the script to events in the event viewer, but I realized that having it execute 5 minutes after system startup should suffice as by that point the services are probably up. Another issue I faced was with user accounts, the Test-SqlAvailabilityGroups command & other from that family in PowerShell require the executing user to be able to execute sql commands. (Is this documented in the documentation?). The System user isn't able to do it, at least on the servers that I worked on.

Also, been grinding leetcode for the past few days. It's somewhat engaging and gives me an opportunity to revise Java. (Haven't worked with Java in a while. I've used the most arcane languages in the past year - Haskell, Scheme, Racket. I decided to get back into Java this year.)


Projects


modruse

modruse is a Skyrim Mod Manager.
Made no commits to the repo. Setup files exist now, though. So that's something. Will try installing skyrim tomorrow & checking what registry values are set by the GoG installer. Also, need to check whether new files are created in the wineprefix.