How do I stop my dog from barking all the time?
Barking is a common behavioral problem and is of special concern for
people who live close to their neighbors. Barking is a natural behavior, and
you should allow your dog to bark in some controlled circumstances.
A dog who barks excessively at the sound of a car in the driveway or the
ring of the doorbell may be protecting his territory. While this behavior
seems desirable, your dog may not be able to tell friend from foe or know
when to curb his aggression, especially if you encourage his watchdog
antics. Some dogs are not territorial but simply enjoy the excitement of
visitors and bark at them for entertainment.
Let your dog announce the arrival of a visitor, but allow him no more
than three barks, then interrupt his barking (by shaking an aluminum can

that contains a few pennies, if necessary) and tell him to sit and stay.

Reward him with praise or a food treat for proper behavior. Practice having
him sit and stay often, even when no one is at the door, until your dog
learns to comply.
If your dog barks or howls when left alone inside your home or
yard, he may be bored, lonely, distressed at being separated from you (see
Behavior and Training: How can I tell if my dog has separation anxiety?),
or attempting to interact with other dogs in your neighborhood. Be sure he
is getting plenty of exercise and attention. Younger dogs (less than three
years of age) and dogs whose ancestors were specifically bred to be highly
active, such as northern breeds, herding breeds, and sporting breeds, are
especially susceptible to boredom. Consider these solutions: buy a dog toy
designed specifically to entertain a dog who is left alone; hire someone to
take your dog for an energetic walk during your daily absence; or take your
dog to a doggy day care center one or more days each week, so he’ll be able
to exercise and play to his heart’s content.
Several types of antibark (also called bark-control) collars are currently
available. Some of them spray citronella (pungent aromatic oil
extracted from the Asian grass Cymbopogon nardus), some collars emit
a high-pitched noise, and some emit a static shock. These products have
variable effects, depending on how they are used, but they do not address
the underlying problems that are causing the dog to bark. Likewise, debarking
surgery, in which the dog’s vocal chords are altered so that he can no
longer bark at full volume (although many debarked dogs can still make a
significant amount of vocal noise) will not change the dog’s behavior. 

Dr. Leslie Sinclair, Ask The Vet About Dogs