HOUSTON -- Garrett Atkins couldn't get himself to stop making bad swings for more than a month. He got it right twice on Thursday night and hopes he can finally put his sluggish start behind him.
Ryan Spilborghs and Brad Hawpe added solo homers and Jason Hammel pitched seven effective innings for the Rockies, who avoided a sweep and stopped Houston's four-game winning streak.
Atkins came into the game batting .188 and had only 11 hits in his last 86 at-bats. He never lost his confidence at the plate and didn't make any adjustments before Thursday's game.
"Just kept believing in myself that it was going to turn," Atkins said. "As long as you believe in yourself, you're likely to turn it around."
Colorado manager Jim Tracy only wants Atkins to watch his two home run swings on video before the Rockies open a series in St. Louis this weekend. And Atkins probably will.
"Hopefully, these swings today, I can kind of get that muscle memory going that way and continue it on for a nice little streak," Atkins said.
Hammel (2-3) allowed two runs on four hits with four strikeouts in his longest outing of the season. He bounced back from his last outing against San Diego, when he gave up five runs on eight hits in 3 2/3 innings.
"If you sit there and dwell on them and just remember the negative stuff, you're going to force yourself into a hole," Hammel said. "I pushed that aside, the guys put a hitting show on and that made it easy."
The Rockies pounded Wandy Rodriguez (5-5), who lost his third consecutive start after winning his previous four decisions. Rodriguez came in with an 0.79 ERA at Minute Maid Park, but gave up seven runs and 10 hits in five innings.
"I'm missing location, I'm getting behind in the count, I need to throw first strikes," Rodriguez said. "My arm is all right. Everything feels strong. I don't know what's happening."
Colorado jumped to a 2-0 lead in the third inning before the home run outburst began.
Spilborghs led off with a double and scored on Clint Barmes' triple to the right-field corner. Todd Helton drove in Barmes with an RBI single to center.
Two outs later, Atkins hammered a 1-0 pitch off the brick facade in left-center, his first homer since April 25.
"I just worked on going up there, thought about being relaxed and trusting my hands," Atkins said. "Obviously, it's just one game. But hopefully, it's the start of getting things figured out."
In the fourth, Spilborghs hit an opposite-field drive into the Astros' bullpen, his fifth home run of the season. Then Spilborghs made a tough over-the-shoulder catch in the bottom of the inning on Lance Berkman's deep fly to straightaway center.
Hawpe and Atkins hit back-to-back homers in the fifth to put the Rockies up 7-1. Colorado had back-to-back home runs for the fourth time this season and Atkins recorded multiple homers in a game for the sixth time in his career. Atkins hadn't even had a multihit game since April 27.
• Rockies: Torrealba's son, relative safe after kidnap
Hammel, who came in with a 1.64 ERA in five road appearances this season, retired the first seven hitters he faced and never struggled.
Houston plated its first run in the third, when Edwin Maysonet singled and scored on Michael Bourn's double down the right-field line.
Hammel struck out the next three batters and didn't allow another hit until Berkman led off the seventh with a double. Berkman scored on Maysonet's two-out single to make it 7-2.
Colorado tacked on three runs in the eighth inning off Brandon Backe. The Astros added one in the bottom half off Jason Grilli.
Miguel Tejada went 0-for-5 to end his 17-game hitting streak.
The Rockies tied their season high for home runs in a game. Colorado also hit four home runs in a 12-1 win over the Astros on May 12 at Coors Field. ... Astros RHP Geoff Geary threw about 40 pitches in the bullpen and will start a rehab stint with Houston's Double-A affiliate this weekend. Geary has been on the disabled list since May 14 with right biceps tendinitis.