I have a Hoover Steam cleaner that has always done a very good job. With our dog getting older and leaving little "leaks" where she lays down, it all of a sudden started to not work on getting those stains out anymore. I researched online different types of cleansers to use in the machine and what I found over and over again (and what turned out to work for me) was to use just a little bit of the soap that is called for in the Steamer itself, and then fill the reservoir with BOILING water, to which you've added 1/4 cup of white vinegar.
Our carpet is very light so I wasn't worried about discoloration (don't know if vinegar would take the color out or not?) but all the commercial cleaner people on the forums I was reading said the hotter you can get your water the better chance you have of getting the stain out.
So now in addition to lugging out the steam cleaner every week I get to fill all my pots with water as I get ready to do it...but it beats replacing the carpet (OR the dog)!.
May not know about old carpet stains, but I do know old dogs. Ike is right, the vet has pills which are very effective not not too expensive. Hormones, basically. I use my lil green cleaning machine to clean up after our critters. Does a good quick job, and is easier to lug out than the big ones. Good Luck with the ol pup. Thanks, will try your tip!
.