...I wouldn't try this if you live in a populated area.
You've got a point there, as I do live now in a semi remote area. However, I first learned of the trick when I lived in Miami, FL.
My next door neighbor had a very viscious pit bull that he usually left to guard his business. On occasion he would bring it home and let it loose in his back yard.
At the time I had small children, and the dog seemed to have a proclivity to attempt to climb the fence to get at them, and me as well.
I first learned of this little "trick" from a documentary about a guy who lived in the Northwest Territories and was studying wolves. Apparently, he was in a lonely shack in wolf country, and the wolves (being naturally curious, and probably hungry) were closing in on his cabin. He related how he drank lots of tea, then went out and "marked" various rocks around his cabin, at which point, the wolves would come and "mark" the other side of the rock to delineate their "territory" and left him alone after that.
I figured I had nothing to lose with my neighbor's pit bull (I had already warned him that, because I had small children, I would not hesitate to kill the dog if it got in my yard), so, very
late one night, after consuming copious amounts of Diet Coke, I went out and "marked" the fence.
Naturally, the pit came charging up to the fence, but, much to my surprise, stopped, sniffed the fence, proceeded to "mark" his side and never bothered me again.
So, you have a point about populated areas, but just go out very late at night and take care of it. Trust me: It works.