My go-to. There's no store bought spray I've ever used that adds up to Remove Cat Urine and Dog Urine from carpet quite like this one. Mix 1 part water, and 3 parts vinegar. Spray. Let it soak for 30 minutes. Mix 1 cup of hydrogen peroxide, 2 teaspoons of baking soda, and a squirt of dish-washing liquid. Shake it well. Spray, and let it soak/dry. Adjustments can be made for the measurements, to your liking.
This is a guide about removing pet urine smell from furniture. If you have a pet urinate on your furniture you know how difficult it is to clean up. Even if you get to it right away the smell can still linger for a longtime afterward.
Lemon juice also work great as an dog urine odor remover. Mix lemon juice -- commercial or freshly squeezed -- with water and sprinkle it on your carpets. This smell is pleasant for people, but will keep your dog at bay. The citric acid is also effective if you want to clean and remove urine odor from carpets.