PHOENIX (AP) Alex Guerrero was in the lineup after two players were injured in a span of two pitches the previous night.
He got his first RBI in the big leagues, added another, hit his first homer in the majors and played solid defense for nine innings.
Not a bad first day in the starting lineup.
Guerrero homered and had four RBIs, Zack Greinke pitched seven strong innings and the Los Angeles Dodgers avoided a three-game sweep with a 7-4 win over the Arizona Diamondbacks on Sunday.
''He's been hitting since all last spring, all last year - he can hit,'' Dodgers manager Don Mattingly said. ''Our biggest fear was defensively, how he looked last year, but he's been good all through spring.''
The Dodgers had two hits in a shutout loss to the Diamondbacks Saturday night, but were swinging the bats well in the series finale, hitting balls over the wall and all over the ballpark.
Guerrero, in the starting lineup after injuries to Justin Turner and Juan Uribe, finished 3 for 5 with a two-run homer off Oliver Perez in the eighth inning. Yasiel Puig hit his first homer of 2015 off Josh Collmenter (0-2) in the fifth inning. Joc Pederson had his first big league homer and three of Los Angeles' 16 hits.
Greinke (1-0) was sharp in his second straight start to open the season, allowing five hits and striking out seven a day after the Diamondbacks roughed up reigning NL Cy Young Award winner Clayton Kershaw.
''I thought Zack was really what we kind of needed today,'' Mattingly said.
The Diamondbacks fought back after Greinke left.
They loaded the bases in the ninth inning off Chris Hatcher, setting up a three-run double by A.J. Pollock and Jordan Pacheco's RBI single. Ender Inciarte fought off several good pitches in an attempt to keep the rally going, but eventually flied out off Joel Peralta, who earned his second save.
''The guys battled it was good; that's the attitude we have,'' Diamondbacks manager Chip Hale. ''It doesn't matter what the score is or the situation we are going to battle to the end, 27 outs, offensively or defensively.''
Greinke pitched well in his opening start on Tuesday, allowing a run and two hits against San Diego. He ended up with a no-decision after the Dodgers' bullpen allowed six runs over the final three innings for a 7-3 loss.
Greinke was good again, allowing one runner to reach second base while hitting his spots and keeping the Diamondbacks off-balance.
''I tried to make good pitches and make the other team adjust,'' Greinke said. ''That was the plan, to kind of mix it up.''
Puig broke out of his early season slump with one big swing.
The Cuban slugger sat on the bench for Saturday's game against Arizona after opening the season 2 for 17. Puig hit a foul ball into the second deck in his third at-bat against Collmenter and straightened it out two pitches later, lining a leadoff homer to left in the fifth inning to put Los Angeles up 3-0.
Collmenter struggled after getting the ball on opening day for the first time, allowing five runs and 10 hits in 4 2-3 innings against San Francisco.
He continued to scuffle against the Dodgers, though worked through traffic to limit them to three runs and nine hits in five innings. Jimmy Rollins had a sacrifice fly in the third inning and Guerrero got his first big league RBI with a run-scoring single in the fourth.
''I've got to make better pitches,'' Collmenter said. ''Even the ones that aren't getting a lot of the bat, they are getting enough of it so I have to put them in a better location.''
Arizona 2B Chris Owings snapped a 0-for-14 streak to start the season with his ninth-inning, pinch-hit double. ... Dodgers 1B Adrian Gonzalez is 17 for 26 with seven homers and 11 RBIs during a seven-game hitting streak dating to last season.
Dodgers: Mattingly did not expect Uribe (hamstring) and Turner (cut finger) to be out more than a few days.
Diamondbacks: Arizona placed catcher Gerald Laird on the 15-day disabled list with lower-back spasms, retroactive to April 9. He was scheduled to start Saturday against the Dodgers, but starter Tuffy Gosewich had to play after Laird's back flared up.
Dodgers: RHP Brandon McCarthy will make his second start for the Dodgers against Seattle on Monday. He allowed four runs and nine hits in five innings against San Diego in his debut on Wednesday.
Diamondbacks: RHP Rubby De La Rosa will start the opener of a three-game series against the Padres on Monday after winning his Arizona debut.