There are things on the market for this sort of thing. I'm not sure what it's called? But it's a spray mostly comprised of ammonia that will make it so a diog doesn't go within feet of it!

I wish I knew what it was called, I forget?