The Andy Griffith Show - Season 5 Episode 6 Barney's Bloodhound Nip it in the bud!
Overview: Barney buys an old bloodhound to help him and Andy track down a prison escapee, but he only succeeds in getting them both taken hostage. That's when Andy remembers the dog's one pet peeve.