Always been a dog person and I don’t hate my current dog but since getting cats I have definitely become a bit of a kitty convert!
You don’t give much information as to whether the urinating issue is new or if you can identify a trigger. If it is new and you can’t identify a trigger then I would start by having him vet checked including supplying a urine sample to rule out medical causes. Make sure you are cleaning the area with a biological washing agent or professional cleaner otherwise he will still be able to smell where he has been even if you can’t which will encourage his return. If the dog is only urinating upstairs then the simplest solution is to put up a gate to try and break the cycle. If needs be confine him to a room with hard floors when you have to go out so if he does pee its easily cleaned / disinfected.
People seem to be overly focusing on neutering here but if an un-neutered dog has reached 7 without issue before this behaviour starting then neutering isn’t going to address the actual underlying cause and is unlikely to solve the issue unless its related to something medical like an enlarged prostate for example.
I had a similar issue regarding inappropriate urination with my dog not that long ago, Pomeranian, similar age (9) no apparent trigger, neutered, many tests and medical issues ruled out. I came on here (dog boards) for advice and just found people super unhelpful, just like how everyone on this thread has done nothing but fixate on neutering, everyone just fixated on the fact I dare leave him home alone to go to work. I don’t / didn’t hate him but the behaviour is definitely deflating and highly stress inducing especially when its on carpets and soft furnishings. In my case the affected areas always seemed to be the sofa, the upstairs carpets and my bed, I professionally cleaned everywhere and literally put a few very small steps into place such as a cover on the sofa, a stair gate on the stairs so no unsupervised access to upstairs / carpets, no coming onto my bed and (touch wood) the behaviour stopped as quickly as it started. We’re on 5 weeks now and the last couple of days I’ve just started letting him back onto the bed with me in the mornings for a short while.
A trainer will be able to offer advice on tackling the barking, in the meantime if he barks at people you make him come straight back in, if he's not out he physically can’t be running up & down barking at people going past.