The figures, made available to selected server vendors Monday, also cover Linux servers, servers with x86 chips and the overall performance of the server industry.
During the quarter, the server industry generated $10.5 billion in sales, a 1.3 percent increase over year-ago figures, according to Gartner. The increase, however, does not necessarily point to a recovery.
"We are seeing signs of growth when you look at the overall server market," said Joe Gonzalez, a Gartner Dataquest analyst. "But we need to see several quarters of growth, and stronger revenue growth, before we can say we're on our way to a recovery. We also need to see signs of sustained profitability."
In the Unix arena, which generated nearly $4.1 billion in sales, Sun maintained its top ranking with 35.6 percent of the market. But that was down from its market lead of 42.3 percent a year ago.
As a result of the sizable drop, Sun found HP closer on its tail for the No. 1 spot. A year ago, HP trailed Sun by 12 percentage points, but in the second quarter of this year, HP held a 31.5 percent share of the Unix market, four points shy of Sun's position.
But HP was up only slightly from a year ago, when it held a 30.4 percent market share, according to Gartner. Rival researcher IDC reported last month that HP's Unix server sales dropped during the quarter. (Gartner's market-share figures differ from.)
According to Gartner, much of Sun's lost market share was picked up by IBM, which bolstered its slice of the pie by 5 points to 22.8 percent. However, the news wasn't all bad for Sun.
"Although Sun had a significant decline for the year, it showed improvement over the previous quarter," Gonzalez said.
During the past 12 months, Sun has undergone a large product transition and is laying the groundwork for future growth, Gonzalez added.
In taking a broader industry view, IBM maintained its lead in the overall server market, which includes mainframes, supercomputers and regular servers, according to Gartner.
Big Blue generated $3.2 billion in total server sales during the second quarter and captured 30.7 percent of the overall market. That performance was up slightly from its 28.8 percent market share a year ago, but remained largely flat over the previous quarter. Hewlett-Packard, which accounted for 27 percent of the overall market and ranked second, and Dell, which grabbed 9 percent of the market, both increased their market share during the quarter. Sun, the No. 3 server maker, represented 13.9 percent of the overall market.
Meanwhile, in focusing on the x86-based server market, HP remained the leader with its 31.6 percent share. That was down, however, from year-ago figures, when HP accounted for 34.5 percent of the market.
Dell ranked second in x86-based servers with its 21 percent of the market--a slight increase from its 19.9 percent slice a year ago. IBM also captured more of the market in the second quarter, ranking third with 17.2 percent--up from 16.1 percent a year ago.
And in the Linux world, HP held the lead during the second quarter for machines featuring x86 chips. HP accounted for 30.3 percent of the market, down from its 34.2 percent market share a year ago.
Dell and IBM were running a close race for second place in the Linux server market. Despite a slight decline in market share during the year, Dell maintained the No. 2 position with 21.6 percent market share. IBM narrowed the gap with an increase in market share to 20.1 percent from 19 percent a year ago.