I have had those problems with cats and dogs. I have used the vinegar and water thing quit a bit with some success. I have had to break down and buy the commercial odor removers from the pet store though in some cases.
Also, you can get a black light and use it to find the urine spots if that is a problem. Our final answer to all that is now a house that is all hard floors. No more carpet!
And those goofy critters have not gone on the floor once!
**** The dog is trainable–more than my kids are at times! lol He does try to let you know when he has to go outside. But in the middle of the night, when the house is closed up and we’re all sleeping, you guessed it, he’s gotta go, and no one knows it, and P-U, the stench from these wetting accidents reminds me of an outhouse!