I sometimes carry OC (pepper spray) on me. It does work on dogs, as police sometimes use it on them. It has no permanent effect but can be extremely disabling at the time. I haven't yet used it on a dog, but I've seen it's effects.
My dogs have been attacked while on a walk, and on their leashes. It was terrifying! Unfortunately I didn't have any means of defense with me at the time.