2 of mine had anal gland problems, one usually in relation to his allergies, so we'd treat those, "express" him and he'd be fine. The other one was because when she was younger she had severely malformed glands. Even the vet had problems "expressing" her. We'd started to discuss removing them when she seemed to grow out of. Once in awhile she'll give off a "smell", but within a couple of hours it's gone. Here's a site I looked at when we were checking into it. It was awhile ago, so this is the only one I still have but it might at least give you a general overview.

http://www.allpetsmacomb.com/analglands.html