Pepper spray has worked on a dog for me.
I was at a playground with my then 3 year old son, and my wife. From out of nowhere comes this 50 lb dog, snarling, barking and running at my kid!

I put myself between dog and family, a raised my left arm and shouted BACK! BACK! as my right hand went into my pocket for the pepper spray, I manuevered so I was upwind of the dog, who was standing 3 feet from me snarling and baring his teeth. My wife & son made it to the van, the dog lunged to me, I sprayed a 5 second blast of 15% pepper spray directly into the dog's nose. He snarled and continued forward toward me, but obviously could not see where I was, as he was snapping at the air. We got into the van, called Animal Control, and they said that there was nothing they could do.
Apparently this dog has attacked kids on the schoolyard before, why it's not dead yet is a mystery to me.