Wagner had the surgery Tuesday in Birmingham, Ala., where he had traveled on Monday to get a second opinion. The injury has already sidelined him for nearly a month.
The right-hander was originally diagnosed with inflammation in his right rotator cuff when he was placed on the 15-day disabled list on May 8.
Wagner appeared in 14 games this season, going 0-2 with a 5.74 ERA. Shoulder problems also cost him much of the 2005 season, when he was with the Cincinnati Reds.
Wagner was acquired 11 months ago in a seven-player trade with the Reds.