DENVER (AP) -- Bruce Bochy gave his players a pep talk before Friday's game at Coors Field, and the San Francisco Giants responded with their biggest offensive night of the season.
Ryan Vogelsong pitched into the seventh inning, Buster Posey homered among his four hits and the Giants broke out of an offensive slump to beat the Colorado Rockies 16-4.
Brett Pill also went deep and Angel Pagan had three hits and scored four runs for the Giants, who had lost seven of their past eight.
Bochy, sensing the team needed a push, spoke to the players before batting practice.
''It was time to talk to them and remind them where we're at here,'' Bochy said. ''The biggest problem is we haven't been hitting, and you've got to create excitement by scoring runs. This game is going to humble you at times and you've got to man up and deal with it. You've got to be tougher.''
The meeting was prompted by San Francisco's sudden lack of offense. The Giants were shut out twice and held to one run in two other games during their recent slump, but broke out against Colorado. They had a season high in runs and matched their season best with 16 hits.
''That meeting was very encouraging. We needed somebody to pick us up like that,'' Pagan said. ''We felt like the energy level was down, to be honest. Just go out there and have fun.''
San Francisco wasted no time in getting on the board against Jonathan Sanchez (0-3). The first four batters reached as the Giants took a 2-0 lead on their former teammate.
Sanchez, who tossed a no-hitter for the Giants on July 10, 2009, lasted only three innings, walking three and throwing two wild pitches.
Sanchez has struggled in three starts since coming to Colorado for Jeremy Guthrie on July 20. Friday's start was his shortest outing of his three games.
''I was in trouble in the first inning, threw a lot of pitches,'' Sanchez said. ''The next two innings went quick. We have a pitch count here so I couldn't get deeper.''
Pill made it 3-0 when he hit a leadoff homer in the fourth off Adam Ottavino.
Wilin Rosario homered for the Rockies, who have lost 9 of 11.
The Giants blew it open against Mike Ekstrom in the seventh. Vogelsong led off with a double and scored on Pagan's double. Ryan Theriot walked and Melky Cabrera doubled down the left-field line to make it 6-0.
Cabrera scored on Marco Scutaro's groundout to make it 7-0.
''We don't score like that very often, but the guys broke out of it,'' Bochy said. ''We were in a pretty good funk there. It was a matter of time.''
Vogelsong (9-5) cruised early. He retired the first nine batters of the game and allowed one hit through six innings.
''I felt pretty good. It's a tough place to pitch, man,'' he said. ''The ball doesn't always do what you want to do. I was trying to keep them off the board as long as I could and give these guys a chance to relax and swing the bats. That was my goal.''
The Rockies broke through in the seventh. Dexter Fowler led off with a triple and scored on a sacrifice fly. Jordan Pacheco and Todd Helton hit consecutive doubles, and one out later Rosario hit his 18th homer down the left-field line to make it 7-4.
''They hit some pitches I left up,'' Vogelsong said.
George Kontos relived Vogelsong and got the last two outs to end the inning.
Vogelsong allowed four runs and five hits, struck out seven and walked two in 6 1-3 innings.
''He was locating really well and the balls that we did hit were right at them,'' Rockies shortstop Josh Rutledge said. ''Couldn't really do much about that, couldn't get guys on base.''
The Giants scored six times in the eighth - three on Posey's 15th homer and two on wild pitches by Matt Reynolds. They added three more in the ninth.
Notes: Fowler's triple was the 50th of his career, the most in club history. ... Hunter Pence's single in the eighth was his first hit as a Giant. He was 0 for 10 since being traded to San Francisco on Tuesday. ... Rockies RF Michael Cuddyer (sore right oblique) was out of the starting lineup for the third straight game. He could start Saturday. ... Rockies RHP Jhoulys Chacin allowed four runs in four innings during a rehab start in Double-A. He will make another start in Double A before another rehab start in Triple-A Colorado Springs. ... The Giants will send Madison Bumgarner (11-6) against Colorado's Jeff Francis (3-3) on Saturday.