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.
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.
DIY Pet Urine Remover Spray: -2 cups white distilled vinegar (can substitute for cider vinegar), -2 cups of lukewarm water, -4 generous tablespoons of baking soda, -Spray bottle, -1/2 teaspoon Dawn liquid dish soap. More