Since I still haven't received a reply from you, I don't want you to go any longer without a reply.
The first thing I would do is have him checked for a urinary tract infection. Common symptoms of a urinary tract infection are frequent urination, dribbling urine, blood in the urine, squatting frequently to urinate, strong odor to the urine, inappropriate urination and straining to urinate as well as an increase in fluid intake.
A dog with a UTI does not always show all the symptoms and typically displays 2 or 3. I believe you need to have your Vet check your dog out so it can get medication for the problem if your dog is displaying 2 or more of the above symptoms..
Other causes for increased thirst and frequent urination include kidney failure, diabetes mellitus, cushing, a uterine infection (called pyometra), and liver disease to name a few. You can read about this here:
If it turns out that it is not a medical issue, then it is strictly behavioral. If he is not neutered, you will want to have that done. It helps reduce marking. Be sure to also clean with an enzymatic pet odor remover. Let it soak in so that it reaches everywhere the urine did. That breaks down the protein that causes the odor we can't smell but the dog can and that draws the dog back to the spot to eliminate when the odor starts to fade.
Retraining can also help stop the behavior again. You will need to teach your dog not to lift his leg except for urination. First step will be keeping a leash on him at all times, even in the house when he is not in his crate if you have a crate. If you don't have a crate, I suggest you get one for training purposes. If you can not keep a close eye on him, he should be in his crate or an enclosed area with pads down. While you are watching him, each time he starts to lift his leg inappropriately, you will want to give him a quick short tug on the leash and say "NO" in a LOW TONE, FIRM but not necessarily loud voice. If you think he might have to urinate, take him outside. You will have to do this consistently. When he urinates or marks an appropriate object outside, praise him highly. If he has a favorite object he's been marking, and you notice him smell it but pass it by, praise him for not marking it. You can also give a very small treat. With the short tug of correction along with the NO, he will quickly realize what NO means if he doesn't already know. High tones of voice and yells have the opposite affect on dogs. Dogs think that loud high-pitched noises signal play, while low toned voices are commands. Dogs yip and bark when playing, but growl deep in the throat to warn or correct. Thus the reason for a low toned firm command.
Practice this all the time, and it shouldn't be too long before he stops marking in the house. Then take the leash off. Still watch him closely. You might notice him sniff at an object and turn and look at you to see if you noticed he didn't mark it. If he does, call him to you and praise him. If he tries to mark, a No should now stop him. If you are consistent, your dog will learn that marking inside is not acceptable.
Often dogs mark when there is a female in heat close by but that ould only cause increased marking for a few weeks as long as you cleaned up the urine properly.
I hope this information is helpful to you. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have . If you do find this helpful, please take this opportunity to rate my answer so I am compensated for my time.