SCOTTSDALE, Ariz. — Jorge De La Rosa tuned up for his opening-day start with six shutout innings for the Colorado Rockies on Wednesday, but Hector Sanchez hit a game-ending two-run homer to give the San Francisco Giants an 8-6 win.

De La Rosa, 16-6 in 30 starts for the Rockies in 2013, gave up just three hits, walked one and struck out seven against the Giants.

Right-hander Matt Cain, the Giants' No. 2 starter, continued his up-and-down spring by pitching five innings and giving up six runs on nine hits while walking three and striking out a batter.

Trailing 6-2, the Giants rallied to tie it in the eighth on a grand slam by minor league outfielder Jarrett Parker.

De La Rosa has been inconsistent this spring, but worked on his mechanics since his previous start on Friday.

"I had better rhythm," he said. "I just wanted to try to pitch the way I pitched last year, but I try not to think too much. I want to keep going, do the things I did today."

The Rockies will have Thursday off before finishing their Cactus League season with games against Seattle on Friday and Saturday. The team will begin the regular season on the road against the Miami Marlins on Monday night.