Giants 7, Diamondbacks 3: Hunter Pence and Marco Scutaro hit two-run homers and Hector Sanchez added a homer and two RBIs as host San Francisco took two of three from National League West rival Arizona.
Giants starter Barry Zito (14-8) allowed three runs on six hits over six innings to win his fourth straight decision. Three relievers combined to allow one hit over three scoreless innings to close it out.
Chris Young had a two-run single, and Jake Elmore added an RBI ground-rule double for the Diamondbacks, who will be eliminated from playoff contention with a loss or a St. Louis win.
The Giants got to starter Patrick Corbin (6-8) for six runs in the second inning, as the left-hander allowed both San Francisco homers. Corbin allowed six runs on seven hits over three innings and has lost four of his last five decisions.
Sanchez's RBI double was sandwiched between the two homers in the big inning. Pence's 22nd homer started the scoring, and Scutaro added his seventh later in the frame. Sanchez added his third homer in the eighth.
GAME NOTEBOOK: The Giants announced plans to leave suspended outfielder Melky Cabrera off their postseason roster. Cabrera will be eligible to return from his 50-game suspension for testing positive for performance-enhancing drugs after the fifth postseason game, if the Giants advance that far. … The Diamondbacks finished 40-41 on the road, finishing with a losing record away from home for the sixth time in seven seasons. … The Giants have won Zito's last 10 starts, the first time they've won 10 straight starts by one pitcher since Bill Swift in 1992.