PHOENIX (AP) -- Chad Tracy finally knows how it feels to hit a walkoff homer.
"Now that I've done it I can say I don't think there's any better feeling in baseball than winning the game with a home run," Tracy said.
The Diamondbacks played their franchise-record third straight extra-inning game. Arizona has won the last two, after losing Wednesday to the Mets on Carlos Beltran's 13th-inning home run.
"As long as we come out on top it doesn't really matter," starter Doug Davis said.
Stephen Drew was 2-for-4 for the Diamondbacks, who won for the third time in four games despite managing only five hits against four Royals pitchers and leaving 12 runners on base.
Tracy drove an 0-2 pitch into the right-field stands off Yasuhiko Tabuta (1-2) to end the game.
"The guy has a great change-up and made me look silly on a couple of pitches," Tracy said. "I tried to slow it down a little bit and got a good swing on it."
Manager Bob Melvin wasn't shocked by the outcome.
"Typically a zero-zero game like that, toward the end it takes a home run because everybody's trying to hit one," Melvin said. "Guys tighten up. Everybody wants to be the hero."
Right-hander Billy Buckner (1-0), recalled from Triple-A earlier Friday, pitched the top of the tenth for his first National League victory.
Kansas City starter Zack Greinke allowed only three hits -- Tracy's one-out single in the second and one-out singles by Drew in the third and seventh -- but walked a season-high seven over seven innings. Greinke had five strikeouts -- three against Chris Young.
"It was tough," Greinke said. "You can't really attack them too much. They're aggressive and have a lot of power. That's why I walked so many."
Davis was nearly as stingy as Greinke, allowing six hits over seven innings with four walks and seven strikeouts.
"We just weren't able to adjust," Royals manager Trey Hillman said. "We watched a lot of breaking balls right in the zone. We put some swings on some but he locked us up."
Arizona left the bases loaded in both the second and third innings. Greinke retired Davis on a grounder back to the mound to escape the first jam and struck out Mark Reynolds in the third to end that threat.
The Royals twice advanced runners to third base. Mark Grudzielanek walked in the first and went to third on Alex Gordon's single to center but Davis struck out Jose Guillen and Miguel Olivo to end the inning. In the seventh, Joey Gathright singled, went to second on a wild pitch and stole third with two outs but was stranded when Gordon popped out to Reynolds at third.
"That's me," Davis said. "It seems I put runners on base but I'm able to make the pitch to get out of the inning."
Arizona had optioned RHP Max Scherzer to Tucson before the game to make room for Buckner. Scherzer, the Diamondbacks' top pick in 2006, was 0-2 with a 2.90 ERA in 10 appearances and three starts. Buckner was 4-5 with a 4.48 ERA in 14 starts for the Sidewinders. ... Greinke, who had walked four batters on three occasions this season, only threw 58 of his 111 pitches for strikes. ... During the game, the Diamondbacks traded veteran OF Trot Nixon to the New York Mets for a player to be named later or cash considerations. The 34-year-old Nixon has spent the entire season at Triple-A Tucson, batting .309 with 10 homers and 31 RBIs in 58 games. ... Arizona general manager Josh Byrnes said left fielder Eric Byrnes, on the disabled list since May 27 with two strained hamstrings, had a "good day of running" and could return within the next week. "There's light at the end of the tunnel," Josh Byrnes said.