I remember it is an odd size, not the same as any bolt head I know of, and did have to buy a socket. It's been so long ago that I forget what size it is, but it stays in a plumbing toolbox.

3rd vote for impact driver. I used to use an air wrench, but the 18v one now actually has more removal torque. Let it rattle, and it will give up.

I always break them loose on a new water heater, use a non-hardening pipe dope (forget which), tighten by hand on a ratchet with that socket, and have never had any trouble breaking one loose later. We have a couple of water heaters that are over 20 years old. I change them in years ending in 0 or 5. Thanksgiving weekend is when I do such scheduled maintenance (like cleaning gutters, too), just so I can remember to do it.

When I haven't been able to buy a segmented one, I drain the tank, and lay it over.