Juan Gutierrez closed the door on LA in the bottom of the 10th to get his second save of the season for the Diamondbacks, who have won five straight.
Esmerling Vasquez (3-2) got the win in relief.
Upton had three hits, including a home run, and Ojeda had three hits and drove in three runs.
Manny Ramirez and Matt Kemp hit back-to-back homers and Ronnie Belliard -- acquired Sunday by LA -- homered in his first at-bat for the Dodgers, who lost for just the second time in six games and lead the San Francisco Giants and the Colorado Rockies by 5 ½ in the NL West.
The Dodgers announced during the game that they have acquired Jim Thome from the Chicago White Sox and Jon Garland from Arizona.
Swim Week Miami Beach 2014 [PHOTOS]