How is it possible to fight against rats at the barn without putting the horses and dogs in danger?

Barn cats are the best way. Or Jack Russell Terriers! And keep the grain in tight metal or plastic containers so they can't get access.
If you don't mind doing away with the rat once caught use leg hold traps. Bait them and place them in a stovepipe wedged against a wall. This is the only thing that my parents have fund to control their pack-rat problem
Rat traps
Cats.
I would use Eradicate bait, it's a modified corn product that doesn't affect other animals or those that might consume a dead rat :)
Personally I dont use poison as you never quite know where it will end up or what it will affect, also think its a horrible way for any animal to die.
Instead use stable cats plus very cheap, snap traps baited with chocolate raisins, they cant resist them. One snap and theyre dead, much better than miserable lingering end :)
Join the fun and sign up to connect with our 200,000 members!
Signup
X