There is no way to completely stop dogs from drooling, especially breeds that have loose, heavy lips such as basset hounds. Abnormal drooling can be caused by a variety of medical or psychological issues, so treating the root cause is the only way to stop it.
Dogs have a total of eight salivary glands. These can become injured during fights with other dogs or similar trauma, which can result in excess salivation. They can also develop tumors or cysts. The treatment for these conditions generally involves treating the injury or surgery to drain the cyst. If it is incurable or the gland is severely damaged, the entire gland can be removed.
Drooling is most commonly a response to pain in the mouth, usually from a damaged tooth or a foreign object embedded in the gums. This is often combined with behavioral changes, such as a refusal to eat hard foods or the dog holding its head oddly as it chews, but not always. In these cases, the drooling should stop when the cause of the pain is removed by a veterinarian.
Stomach upset and some congenital problems, such as an enlarged esophagus, can cause excessive drooling. A chronically upset stomach can often be treated by changing the dog's diet, but congenital problems need to be treated by a veterinarian.
Sudden onset of excessive drooling can be caused by diseases such as distemper or rabies, medication side effects or poisoning, all of which need to be treated by a veterinarian.
Finally, dogs may drool when nervous, stressed or afraid. This can be treated by removing the source of their fear, changing management practices and using calming medications in severe cases.