Is he kept with other males?? Very often only the lead male will lift his leg to mark the other males will just pee. You will notice the lower ranking males do not pee over the Lead males, but may urinate over other bitches spots. We recently lost our lead male, the second in the line used to go out and pee in one spot (unless he was away or by himself in another part of the property then he would lift his leg) he is now the lead male and marks all throughout the back field which for 12 years he never did.
My boy didn't cock his leg until the older male that was here before him went to a home near-by. Over the years all my males have done the same, only top male cocks their leg, the others show they are submissive to them by not doing so. My current boy cocks his leg at home but never at shows. He's not dominant in any way. Hips and elbows clear and he's virile.
I have a boy that's 8 years old and never lifts his leg to pee when he's in our backyard. When I take him for walks he always lifts his leg. I never really thought too much about it. His hips and elbows are cleared.
He must not feel the need to mark trees in your own backyard but does when it's not his turf.
I wouldn't worry about the 2 year old that doesn't lift his leg. I can't stand the males marking everything at shows. Including their owners slacks!