Matt Kemp went 4-for-4 with three RBI and a run scored as Los Angeles took a 9-3 win over Arizona in the second of a four-game set.
The magic number for the Dodgers to clinch their first NL West title since 2009 now stands at two.
Adrian Gonzalez hit a two-run home run as did Juan Uribe for the Dodgers, who snapped a four-game losing streak.
"It feels good, it feels good just to be with the team and to be able to go out there and run out with them and compete with them, do all that," said Kemp, who was activated from the disabled list on Monday after missing nearly two months with a sprained left ankle. "I miss baseball man, I haven't been able to play in a while so it feel good."
Zack Greinke (15-3) picked up the win as he gave up just two runs on six hits with a walk and five strikeouts over six innings. He is 7-0 over his last 10 starts and hasn't dropped a game since July 25.
Aaron Hill hit a solo home run for the Diamondbacks, who had a three-game winning streak stopped. Patrick Corbin (14-7) gave up six runs on seven hits over two-plus innings in the loss.
"They got a couple of hits early and I was leaving some breaking balls up," said Corbin. "I just couldn't find my spots early and they were able to get some hits."
The Dodgers jumped out to a 4-0 lead in the first as Kemp hit a two-run double with two outs and Uribe followed with his 12th home run of the season.
In the third, Hanley Ramirez led off with a walk and Gonzalez then hit his 21st home run of the year for a 6-0 advantage.
Los Angeles kept pouring it on the fourth as RBI singles from Mark Ellis and Kemp made it an 8-0 game.
Arizona got one back in the fourth on a run-scoring fielder's choice from Martin Prado, and Hill's homer to leadoff the sixth made it 8-2.
Michael Young tripled in a run in the Dodgers' half of the eighth, while Willie Bloomquist brought in a run with a groundout in the Arizona eighth to account for the final score.
Corbin has dropped four of his past five starts ... The season-series stands at 9-8 in favor of Arizona ... Arizona was 0-for-11 with runners in scoring position and stranded seven ... The Dodgers went 4-for-12 with RISP and left nine on base.