Phenylbutazone or Bute is a wonderful drug but be careful... it does have contraindications. Gastric ulcers is one of them. (but there are others) My friend who used it on her ex-race horse, (known for having ulcers) developed a bleeding ulcer which became very serious. He's OK now but bute is a last resort for him and only after he has been given ulcer medication prior to the use of bute.
Just a heads up but it's worth checking with your vet before using it or a least looking into all the contraindications before using it.
This is response is to expound on Noreen's post regarding ulcers. I agree you should always consult your vet before giving any medications, but a healthy horse can tolerate a minimum dose of bute for extended periods without any problems.
The key word is "pre-existing" ulcers. It's not a given that long term use of bute given in the proper amounts will "cause" ulcers or any of the other problems such as kidney failure. If you have a bleeder, or one with renal problems then bute may not be for them, but if there are no pre-existing problems it's a good long tem solution for some pain issues.
That said, foals are in the high risk category and bute should be used with extreme caution.