Sunan an-Nasa'i #4289
The Book of Hunting and Slaughtering 42:27
It was narrated from Abu Hurairah that the Messenger of Allah said:
"Whoever keep s dog except a dog for hunting, farming or herding livestock, on e Qurat will be deducted from his good deeds each day."