If an NSAID caused your peptic ulcer, your health care provider may tell you to:  Reduce how much of the NSAID you take. Stop taking the NSAID. Switch to another medicine that will not cause ulcers. Take medicine to reduce stomach acid.