Originally Posted by AllanJ
Turn the control knob of a gas water heater from run to pilot, or switch off the breaker for an electric water heater.
Open some hot and cold faucets upstairs. Drain several gallons of water from the water heater, or turn on both faucets of a laundry sink whose spout is lower than the top of the water heater. This will get rid of most of the water in the upstairs pipes that would otherwise fall down and out the pipe above the heater as soon as you cut it to replace the valve.
That's the safe way to go. You can do it live and should vapor lock, but if you have any bad cartridges you'd know it as soon as you cut into the copper.
After you've drained some water off, make sure to close all the faucets again.
Yes you can just shut off the gas valve nearest the heater, not necessary and you'll have to re-light it when you're done.
When you're finished installing the new ball valve; obviously, turn the water back on to the house (slowly), then open your new ball valve to re-fill the tank. Once you hear it stop filling, check for leaks, open all the faucets in the house until you bleed all the air out of the lines.