Certain dogs are really good at taking care of rodent problems but for the most part, that isn't true. My grandparents always had a dog but they were only really able to handle their mice problem when they got cats. A good breed for dealing with rodents would be terriers though. My grandparents' neighbor had a terrier who took care of the rodents and badgers. But you need to keep up with their shots so they don't get rabies and other diseases.
I personally have never had luck getting rid of mice and rats with dogs. Their inability to climb allows for them to climb up or behind furniture. If you really want to get rid of the problem, get a cat or pest control.