Drinking a lot of water and exercising can help prevent kidney and ureteral stones. People who have had stones should limit the amount of calcium and sodium in their diets. This can help prevent kidney stones from happening again.