Rimadyl, tramadol, Metacam, Deramaxx, and Previcox are all common pain mediccations used for dogs. Rimadyl, Previcox and Deramaxx are all non-streoidal anti-inflammatories.
Dogs can take aspirin, but never ibuprofen (Advil) or acetaminophen (Tylenol), which can be lethal. Newver give your dog any medication without the advice of a veterinarian. It is better to have your dog evaluated if he is in pain so that the doctor can prescribe the proper medication for the problem.
You should always talk to your Vet before administering any kind of medications to your dog. Some Meds that a Vet may give you, may be very costly. A half an Asprin is something can be givin to a dog to help with pain. I would get some meds from your Vet to be on the safe side.
Many dogs respond well to 1-2 un-coated baby aspirin. If the dog is larger (over 60-70lbs) you may find that one 200mg Advil is more beneficial. Your veterinarian should always be consulted before using any medication for your pets. He/she will be able to give you proper dosage amounts and schedules.