HOUSTON -- Arizona manager A.J. Hinch's decision to move Justin Upton from second to third in the lineup in an effort to spark his right fielder paid dividends Tuesday.

Upton's third-inning home run was the game's only run as the D-backs defeated the Astros, 1-0, sending Houston to its eighth consecutive loss for the second time this season.

Upton made a winner out of Ian Kennedy, who pitched 6 2/3 scoreless innings and outdueled Roy Oswalt.

"For us to win that way is good," said Upton.

Kennedy allowed eight hits and two walks in the longest scoreless appearance of his career.

"He answered the bell," said Hinch. "The key was not giving up runs."

Oswalt was just as impressive except for Upton taking his fastball to the deepest part of Minute Maid Park.

Oswalt tied his season high with eight strikeouts and allowed only five hits. The Astros had eight hits to the D-backs' five, but the offense failed to give Oswalt any run support. Oswalt even tried to spark the offense himself with a 12-pitch at-bat that resulted in a single in the third inning.

"It feels good to get the win," said Kennedy. "It's great because he's an All-Star pitcher. It's nice because he's not going to give up many runs."

The one run was all the D-backs needed as their pitching staff got its first shutout of the season. The Astros were shut out for the fourth time. Juan Gutierrez relieved Kennedy with two outs in the seventh and a runner on second base and ended a scoring threat. Gutierrez pitched a perfect eighth, and former Astro Chad Qualls pitched a 1-2-3 ninth to secure his sixth save of the season.

It was Upton's big blow, his fifth home run of the season, that was the difference maker.

Upton, who came into the game batting .225, homered in his second at-bat. It was a 447-foot shot to straightaway center and the 10th-longest home run in Minute Maid Park's 11-year history.

"I knew I had gotten it pretty good and I was hoping it would go," said Upton.

Upton wasn't sure when he hit it that it was definitely going out, but Astros center fielder Michael Bourn ran out of room chasing the ball at the top of Tal's Hill.

"When I hit the ball, I looked at it. I thought I had gotten it, but I started running because Mike [Bourn] was still running," said Upton.

Upton was nearly at second base when the ball cleared the center-field wall.

Kennedy's previous high of scoreless innings was five, accomplished earlier this season on April 18 at San Diego.

"My confidence never went away," said Kennedy, who entered Tuesday's game with a 4.45 ERA. "You know when you believe in your ability." Kennedy left the game with two outs in the seventh inning with Kazuo Matsui, the potential tying run, on second base.

"I told him he did a good job and that we were going to get that last out and get him the win," said Hinch.

And they did. Gutierrez got Carlos Lee to ground out to short to end the threat.

The final out of the game came on a diving catch by Arizona left fielder Gerardo Parra, robbing Geoff Blum of a hit.

"A great diving catch," said Hinch. "That could have changed the whole game if that ball goes to the wall."

No batter had more than one hit on Tuesday, indicating how strong the pitching was.

Upton, Kelly Johnson, Adam LaRoche, Chris Young and Parra got the Arizona hits. For Houston, Bourn, Lee, Hunter Pence, Pedro Feliz, Tommy Manzella, Humberto Quintero, Matsui and Oswalt got hits. The only extra-base hits were doubles by LaRoche and Bourn and Upton's homer.

The D-backs wasted an opportunity to add to a 1-0 lead when Young was picked off third base for the third out in the fourth inning with runners on the corners.

Young was thrown out on a delayed throw from Quintero to third baseman Feliz. With Kennedy batting, Quintero took an offering from Oswalt and faked a throw to third, followed by a throw to Feliz, who was casually walking toward third base. Young was equally casually walking back to third when Feliz applied the tag, ending the threat.

The Astros also had their opportunities to score but left two runners on in the first two innings and in the fourth.

The Astros also had a player picked off. After opening the sixth inning with an infield hit, Pence got caught in a rundown between first and second for the second out of the inning.