Bud Norris hasn't won since the end of May and Houston hasn't won on the road in over a month. Norris at least gave the Astros a chance on Sunday.

Norris gave the Astros a quality start and Chris Johnson doubled home a run but Matt Cain was still good enough to help give the San Francisco Giants a 3-2 victory over the Astros on Sunday and a sweep of the three-game series.

The Astros' last road win came in their last trip to San Francisco, which was better known for Cain's perfect game.

"They have been tough on us," Norris said after getting out of jams in the first and fourth. "We've played a lot of close games and we need to get over the hump. I wasn't very sharp and I struggled to find consistency. I have plenty of starts left and I have to get back out there out there and pitch better."

Norris (5-7) lost his sixth consecutive start and is winless over his last seven. He has a 7.27 ERA over that span after giving up three runs on five hits over six innings. He walked six and struck out six.

"I thought Bud did a good job of working around those six walks," Astros' manager Brad Mills said. "He gave us a quality start and a chance to win the game.

Cain wasn't as dominant as he was when he pitched the first perfect game in Giants history against the Astros on June 13 but did just enough to win for just the second time since that historic night. San Francisco's right-hander struck out six and walked one.

"All you can do is battle against him," Johnson said. "I was trying not to lose. That's how you have to approach this whole pitching staff. He's one of the best pitchers I've faced, easily in the top three."

The Giants won despite being without their best hitter. Melky Cabrera took a temporary leave to attend the birth of his child in Florida.

Marwin Gonzalez had two hits and scored a run for the Astros, who lost their 13th straight on the road and fell to 1-10 in July.

Cain (10-3) snapped his personal three-game winless streak but didn't come close to duplicating his first outing when he retired 27 consecutive Houston hitters when the two teams met earlier this season.

Four relievers combined to blank Houston over the final 2 2-3 innings. Santiago Casilla, who blew a save on Saturday and was booed when he entered the game with one out in the ninth on Sunday, retired two batters for his 23rd save.

Houston scored only five runs in the series while Astros hitters struck out 34 times in the three games.

San Francisco jumped on Norris for two runs in the first inning. Posey had an RBI single and Brandon Belt drew a bases-loaded walk to force in Emmanuel Burriss.

That looked like it might be enough for Cain, who had retired 34 consecutive Houston hitters dating to last year before Gonzalez's leadoff double in the third.

Gonzalez, activated from the disabled list before the game, later scored on Cain's two-out throwing error.

Cain retired Scott Moore to get out of the two-on, two-out jam but wasn't as fortunate the next inning. Brian Bogusevic singled and scored on Johnson's double to the gap in left center to tie the game at 2.

The Giants regained the lead in the fifth and Cain stuck around long enough to get the win.

NOTES: The Astros placed IF Jed Lowrie and C Jason Castro on the disabled list before the game. Lowrie injured his right ankle and leg during a collision at second base in the third inning of Saturday's game while continues to hindered by soreness in his right leg, the same one he had surgery on in March 2011. Houston also purchased the contract of C Carlos Corporan from Triple-A Oklahoma City. ... San Francisco LHP Barry Zito (7-6) will pitch Tuesday's series opener in Atlanta. ... J.A. Happ (6-9) goes for Houston on Monday in San Diego.