Aubrey Huff and Bengie Molina also homered while helping the Giants improve to 6-2 on their current nine-game homestand.
Cain struck out eight and walked three, allowing only a fourth-inning double to Troy Tulowitzki while earning his first win of the season. He also had a two-out, bunt single in the sixth for his hit of 2010.
Cain (1-1) won for the first time since Sept. 27, 2009, throwing 123 pitches -- his most since 125 against Florida on Aug. 20, 2008. He left to a standing ovation after the eighth.
The Giants' right-hander labored at times and had to pitch out of a two-on, no-out jam in the second. He also retired 15 straight batters after giving up Tulowitzki's leadoff hit in the fourth. Guillermo Mota relieved Cain to start the ninth and gave up a single to Carlos Gonzalez, who later scored on Todd Helton's two-out single.
Esmil Rogers (0-1) took the loss after being called up from Triple-A Colorado Springs. The 24-year-old right-hander, who was the only rookie to make the Rockies' opening day roster, had been in the minors since April 16, when he was sent down to make room for pitcher Joe Beimel.
He got himself into trouble early, walking Molina leading off the second then giving up a single to Huff. One batter later, Uribe homered to left-center to make it 3-0.
It got even uglier for Colorado after that.
After Nate Schierholtz walked, Cain laid down a sacrifice bunt and reached base safely when Rockies second baseman Eric Young dropped the casual throw from catcher Miguel Olivo. Schierholtz later scored on John Bowker's sacrifice fly.
Molina homered leading off the third to give the Giants a 5-0 lead. Rogers was gone an inning later.
Colorado certainly didn't help their young pitcher. The Rockies, who struggled against left-hander Barry Zito on Friday, barely avoided being shut out and have scored only nine runs in their last four road games.
Huff went 3-for-4, his second straight multi-hit game after a month-long slump with his new team. He also homered into McCovey Cove in the eighth, the 51st splash hit by a Giants player at the waterfront ballpark.
NOTES: Colorado 3B Ian Stewart was ejected by plate umpire Tim Timmons in the seventh after being called out on strikes. It was the first time he'd been ejected. ... RHP Jason Hammel (strained right groin) did long toss for a second straight day and may throw a bullpen session for the Rockies on Sunday. ... Giants SS Edgar Renteria (groin) will miss the rest of the series after hurting his groin early in Friday's game. ... CF Aaron Rowand will come off the disabled list Sunday for San Francisco. He's been out since a fractured cheekbone and concussion after getting hit by a pitch from Vicente Padilla of the Dodgers on April 16. ... To clear room for Rogers, the Rockies designated RHP Juan Rincon for assignment.
(Copyright 2010 by The Associated Press. All Rights Reserved.)