I have an anal fissure and I am using. 2% nitrogylcerin for past 4 months. Fissure goes off and comes on back again when I get hard stools. Plz advise?

Curable. If you have an anal fissure that has not healed after several months of appropriate medical treatment as you describe, it is extremely unlikely that it will heal (permanently) without surgery, no matter what other medications you try. See a colorectal surgeon (www fascrs.Org to find one); there are simple outpatient procedures with a better than 90% cure rate.
May need new ointmen. There is another ointment to try or consider the surgery.
Fiber and cortisone . Keeping your stools soft and moving should help to prevent this. Taking a little bit of fiber and a lot more water will help. Most people make the mistake of increasing their fiber too quickly and not increasing their water intake. That will just make the stools harder. In the mean time some cortisone cream will help the fissure heal faster. Just don't use it over 5 days at a time.