* TSX rises 29.62 points, or 0.24 percent, to 12,620.85 * Five of 10 main index sectors advance * Goldcorp, Barrick lead gainers * National Bank climbs after results By John Tilak TORONTO, Aug 28 (Reuters) - Canada's main stock index climbed on Wednesday as concerns about potential Western military action against Syria drove up commodity prices to record levels and helped lift shares of energy and materials companies. The United Nations Security Council was set for a showdown over Syria as Britain sought authorization for Western military action that Russia called premature and seems certain to block. Fears that the U.S. Federal Reserve will soon begin easing off its monetary stimulus measures also played on the minds of investors. With tensions in Syria escalating, the price of gold reached a 3-1/2 month-high as its safe-haven appeal grew, and oil hit a six-month high on worries about potential supply problems. "Both of those (oil and gold) have moved on the fear that hostilities in the Middle East will spill over, become more problematic for the West, and possibly impact supply and demand," said John Stephenson, senior vice president at First Asset Investment Management Inc. While the overall mood was pessimistic, despite positive earnings results from the Canadian banks and improving global economic data, investors are trying to benefit from short-term gains in commodity prices, he said. "It's really a geopolitical and macro call," Stephenson said. "If you believe gold will go higher from here and oil will go higher from here, why muck around with the company. Why not just play the futures and buy the commodity?" The Toronto Stock Exchange's S&P/TSX composite index was up 29.62 points, or 0.24 percent, at 12,620.85, recovering from its biggest drop in more than two months in the previous session. Five of the 10 main sectors on the index advanced. The materials sector, which includes mining stocks, rose 0.8 percent, helped by a 1.5 percent jump in shares of gold producers. Goldcorp Inc added 2.4 percent to C$32.10, and Barrick Gold Corp was up 2.5 percent, at C$21.10. The two stocks had the biggest positive influence on the market Helped by the higher oil price, energy shares gained 0.6 percent. Canadian Natural Resources Ltd climbed 1.5 percent to C$32.22, and Suncor Energy Inc rose 0.8 percent to C$36.39. In company news, National Bank of Canada's third-quarter profit grew almost 11 percent, as an increase in trading activity boosted earnings from its financial markets division. The stock added 1.6 percent to C$80.50.