We've all seen our dogs hold their urine for long period of time. Instead of praising your dog for holding the urine for so long, you should be looking at this as a potential health problem for your dog. According to HealthyPetCoach.com:
The same is true for dogs! I often hear people say that their dog can go 8 – 10 hours without having an accident in the house. Of course he can! Your positive reinforcement training works! Dogs strive to please their people.
However, having your dog ‘hold it in’ for long periods can lead to the development of bacteria in the accumulated urine. This can lead to a urinary tract infection or worse – a bladder or kidney infection. When a dog holds urine for long periods, bladder stones can form. Over time, spending days, weeks, months and years holding urine for extended periods can also contribute to incontinence.
Having a pet door installed will solve the problem. It enables your dog to go in and out at its own will. This means that it can urinate whenever it needs to or get fresh air outside. Then, you want to make sure that there are boundary set for the dog, so it doesn't run off.