Re: Stopping dog from peeing inside??
Have they always had this problem? Are they males? Males like to be territorial...as people have said. If this is a new behavior, it could be the older dog is getting old and needs to go out more, and the younger dog tries to "take territory" from the older dog. Male dogs mark their territory...and another comes along, sniffs, and tries to mark his territory higher up on the tree/hydrant/wall, etc to make him "smell bigger" than the other dog.
As far as general dog training, I've found a proactive approach to be much better. When I moved back in with my parents after college, my dog went crazy with all the scents from the other 3 dogs living at home. He took a particular liking to my dad's subwoofer surround sound speaker. I started keeping him tethered to me with a long leash inside the house. As others have mentioned, you have to catch the dog in the act. In the living room, the dog beds were close to the speaker...I'd let him go to the bed, but when he stood up and starting sniffing at the speaker, I gave the leash a quick pop and gave the "NO" command. He quickly caught on and I was able to relax some without following him around everywhere.
It is also important to recognize the difference between marking and peeing. Peeing is when they drank too much water and they have to gooooo bad-resulting in a huge puddle! Sometimes they can't help it! Marking, or spraying, is a reaction to the scent...like if you take your dog for a walk and he wants to pee on every bush or hydrant or tree etc. One good thing is to train them to "pee" but not to mark. IE: On walks, let him go once....but if he wants to stop again, let him sniff for a second, then give the leash a tug and tell him "LETS GO". This tends to train him it's OK to sniff around, but not OK to mark.
Restricting areas also does wonders: Baby gates work just as well on dogs!
Of course, all of this is pointless if you can't get rid of the smell! I used Woolite Pet cleaner from Wal-Mart and it worked OK. To solve the problem, it will be a combination of all of these methods.
Also, most dogs respond better to positive reinforcement. I had a major barking issue with my dog as he would want to bark at every thing in the back yard. It was easy for me to get frustrated where I'd yell at him "HUSH" and literally try to square him quiet...which did the opposite. He'd get so scared his bark changed to a high pitched yelp and squeal as he cowered to the ground. The only thing I changed is instead of acting aggressive/mad, if he barked up a storm, I'd whistle or clap to get his attention, tell him to sit and tell him "HUSH". I'd make him sit and be quiet and when he was quiet, I'd give him a positive reward (treat, tennis ball, pat on the head). Also, if I let him out and he didn't bark at all, I'd tell him good boy and give him a treat. It took about 2-3 weeks before he reduced his barking dramatically.