* Sees Q2 operating profit Y500 mln vs Y24.5 bln loss last yr
* Sees Q2 net loss Y8 bln vs Y31.9 bln loss last yr
* DRAM price peaking, risk of oversupply remains - analyst
* Shares up 2.9 pct vs 1.7 pct rise for elec machinery index (Adds closing share price, byline, recasts lead)
By Mayumi Negishi
TOKYO, Oct 15 (Reuters) - Japan's Elpida Memory Inc said it earned its first operating profit in eight quarters on a surge in chip prices and demand, underlining a semiconductor sector recovery following a two-year slump.
Elpida, which secured a $2 billion lifeline in September including public money, is hurrying to join industry leader Samsung Electronics Co in a new round of technology spending to widen its lead over smaller Taiwanese makers of dynamic random access memory (DRAM).
It said it will post a surprise 500 million yen ($5.6 million) operating profit for July-September, compared with a 24.5 billion yen loss in the previous year and an average estimate of a 15 billion yen loss by five analysts polled by Thomson Reuters I/B/E/S.
The news lifted Elpida shares 2.9 percent. Its shares have more than doubled this calendar year.
Spot prices of DRAM are now more than double what they were a year ago, according to research firm inSpectrum. Analysts credit demand rises for cutting-edge chips for high-performance computers as well as procurement by Chinese brokers following the National Day holiday in early October.
But some analysts warned the recovery might be short-lived as chipmakers start investing again.
Elpida could face another bout of oversupply, cautioned Credit Suisse analyst Hideyuki Maekawa, who said that DRAM prices will peak in the first half of October.
"Taiwanese DRAM makers are boosting production, DDR3 prices have started to fall below those of DDR2, which signals a shift in demand to DDR3, and PC production activity is itself peaking," Maekawa said in a note to investors.
Elpida, which is vying with U.S. chipmaker Micron Technology Inc to be the world's No.3 maker of DRAM, said its net loss narrowed in the quarter just ended to 8 billion yen from the 31.9 billion yen loss a year earlier.
Japan's sole maker of DRAM, forced by its cumulative losses to raise capital twice this year and seek public aid, logged a 15.5 percent fall in sales compared with the previous year, as the yen strengthened and competition lowered its prices.
But it was able to make up for the sales fall by making smaller and more cost-efficient chips, spokesman Hideki Saito said.
Elpida is keeping pace with bigger rivals Samsung and Hynix Semiconductor, saying it will begin bulk production of 40-nanometre chips this year at its cutting edge plant in Hiroshima, western Japan.
Taiwan-based Rexchip Electronics Corp, 64 percent owned by Elpida and 34 percent by Powerchip Semiconductor, made its first profit in five quarters in July-September after switching to smaller 65-nanometre chips from 70-nanometre chips, Elpida said last week.
Smaller chips pack more transistors onto slivers of silicon, allowing chipmakers to boost output of more powerful chips from each silicon wafer, lowering per-chip costs.
Hit by seven quarters of losses, Elpida last month raised funds including 110 billion yen in loans from its creditors, and the government-backed Development Bank of Japan, and another 60 billion yen to invest in new technologies and pay back debt while DRAM prices are strong.
It also plans to enter capital ties with Taiwan government-backed Taiwan Memory.
Shares in Elpida closed at 1,260 yen at a three-week high, outperforming the Tokyo electrical machinery index's 1.7 percent climb. ($1=89.43 Yen) (Reporting by Mayumi Negishi; Editing by Michael Watson and Joseph Radford)