The outcome spoiled the Philadelphia managerial debut of Ryne Sandberg, who took over from Charlie Manuel earlier in the day. Manuel, 69, was let go after winning 780 games and five division titles with the Phillies over eight-plus seasons.
Los Angeles has not lost consecutive games in almost two months and since June 21 has posted a 41-8 record to take charge in the National League West.
Greinke (11-3) threw 113 pitches while walking four and striking out three. The shutout was finished off by Paco Rodriguez, Ronald Belisario and Kenley Jansen, none of whom allowed up a hit.
Hanley Ramirez gave the Dodgers the lead with a two-run homer in the fourth, Mark Ellis added an RBI single in the seventh and Scott Van Slyke, recalled from Class AAA Albuquerque on Friday, singled in a run in the ninth.
Cliff Lee (10-6) suffered the loss despite an eight-inning performance in which he gave up three runs on just five hits.
2014: The Year in Music [PHOTOS]