PHOENIX -- Pablo Sandoval left Monday's game in the fifth inning because of right elbow discomfort, and he said Tuesday the balky elbow was "still a pain."
The Arizona Diamondbacks probably could find several stronger words to describe Sandoval's general presence.
Sandoval's two-run home run in the ninth inning pushed San Francisco to a 2-1 victory over the Diamondbacks on Tuesday, giving him a .357 batting average and six career home runs at Chase Field.
"This was a pretty good swing and a pretty good at-bat," Sandoval said. "I tried to calm down myself, not do too much. It felt pretty good when it came off my bat.
"I'm happy to support my team and get the win. We need it."
Reprising his World Series success, Sandoval finished April with a .333 batting average, four home runs and 22 RBIs. In 140 career at-bats at Chase Field, he has 28 RBIs.
Sandoval hit an 0-1 split-finger pitch from J.J. Putz (2-1), driving in Angel Pagan, who singled to right field to open the ninth. Pagan's hit knocked D-backs starter Trevor Cahill out of the game. Pagan stole second before Sandoval's one-out homer.
"I didn't want (Cahill) to get the loss, so I took him out and went to our closer," D-backs manager Kirk Gibson said. "It's a no-brainer. That's a pretty good lineup you are facing there. You are in the middle of their lineup. You can't change their lineup. And Sandoval is a pretty good hitter.
"You can't make mistakes like that to him, and we did, and he hit it out of the ballpark. I had confidence in my closer. It didn't work out tonight."
Putz suffered his fourth blown save of the season, the last two a week apart on ninth-inning homers by the Giants. It was the D-backs' major league-high 10th blown save.
"It just seems like every time I leave one of those up, it's getting crushed right now," said Putz, who has five saves. "It's very frustrating. The one that Pablo hit just didn't come out of my hand."
Sandy Rosario (1-0) got the last out of the eighth inning to earn a win in his Giants debut. Sergio Romo pitched a 1-2-3 ninth inning for his 10th save, tied for the league lead in his first full season as closer.
Josh Wilson hit his first home run of the season in the top of the eighth off Santiago Casilla after Giants starter Madison Bumgarner shut out the D-backs for seven innings.
Bumgarner gave up three hits and a walk while striking out two. He went 3-0 with a 1.55 ERA in April, second in the National League in ERA behind the St. Louis Cardinals' Jake Westbrook (0.98) and just ahead of the New York Mets' Matt Harvey (1.56).
"Command has been there. Mechanics felt good," Bumgarner said. "I felt pretty much the same every time out. Been able to command both sides of the plate and all my off-speed stuff. The defense has picked me up in a lot of situations. They've been scoring me runs and keeping me out of the loss column so far."
Cahill gave up four hits and one walk and struck out five to lower his ERA to 2.61
"I was going to throw strikes, and if they hit me, they hit me. That was the attitude going in," Cahill said. "Fortunately, they weren't hitting me early, and I was confident as the game went on."
Pagan and Sandoval each had two of the Giants' seven hits.
Wilson's home run was the 10th of his career and his first with the D-backs in 370 games. He has made nine starts in place of injured second baseman Aaron Hill. It was his first homer in 95 at-bats, since June 5, 2011, when he was with the Milwaukee Brewers.
NOTES: Arizona SS Didi Gregorius (concussion symptoms) passed all the medical tests necessary for his return to the field and did pregame work Tuesday. Gregorius, hit in the right temple by a pitch Friday, is on the seven-day disabled list and is eligible to return Saturday, although no return date has been set. ... Giants LHP Jeremy Affeldt (right oblique) is scheduled to pitch in an extended spring training game in Arizona on Wednesday. If there are no setbacks, he will join the Giants on Friday, manager Bruce Bochy said. Affeldt is eligible to return Thursday. ... San Francisco RHP Tim Lincecum will make his first start against the D-backs this season on Wednesday, and it is likely Arizona 1B Paul Goldschmidt will be in the lineup. Goldschmidt is 8-for-14 with five home runs and 10 RBIs against Lincecum in his career. ... Tuesday marked the 52nd anniversary of Willie Mays' four-homer game in the Giants' 14-4 victory at Milwaukee in 1961. The Giants had a major-league-record eight home runs in that game, with two by Jose Pagan and one apiece from Felipe Alou and Orlando Cepeda.