Just did a quick search and this came back.
Anal gland abscesses must be lanced by a veterinarian, and antibiotics are usually given to the pet for seven to 14 days. Using warm compresses on the area often helps to relieve some of the pain and reduce swelling. Secondary problems sometimes occur with abscesses, as they may cause scar tissue or other damage that may affect the nerves and muscles in this area. This can cause fecal incontinence, meaning the pet cannot retain its stools.
If an individual pet only has an occasional problem with the gland, they can be dealt with as needed. However, for pets with repeated or chronic problems, surgical removal of the glands is recommended. This procedure is called an "anal sacculectomy".With the removal of these glands all problems associated with these glands are eliminated for the remainder of the pet's life. Although a fairly simple procedure, complications such as fecal incontinence can rarely occur.
Dogs with recurrent anal gland impactions are often placed on a high fiber diet. The high fiber makes the animal's stool more bulky. The stool will put more pressure on the anal glands as it is passed, and hopefully the glands will express themselves when the animal defecates. There are several commercial brands of high fiber dog food available. Animals may also be supplemented with bran or medications such as Metamucil which will increase the bulk of the stool.
I hope that helps.