Sharks goaltender Vesa Toskala made a pair of outstanding stops early in the first period, denying Dvorak and Torres, the latter on the rebound with a sprawling stop. Several minutes later, Toskala had to be sharp in denying Horcoff in close.
Midway through the period, Roloson had his first big test as he went down to block a shot from the slot by San Jose's Nils Ekman.
Shots on goal after one period were 8-5 in favour of the Sharks.
Early in the second, Milan Michalek scored on a four-on-four situation to move the Sharks into a 1-0 lead over the Oilers. During a scramble in front of Roloson, the puck squirted loose in the crease where Michalek found it and was able to back hand it under the sprawled Oilers netminder.
Some hard work in the corner by Radek Dvorak resulted in Edmonton's first goal of the night. Dvorak stripped Scott Thornton of the puck before dishing it in the slot to Jarret Stoll, who one-timed it high glove side past Toskala.
It took the Sharks four minutes to regain the lead as Steve Bernier's backhand attempt was tipped in by Patrick Marleau at the side of the Oilers net.
Late in the second, the Oilers tied the game up once again after Dick Tarnstrom cleared the puck in from the Sharks blueline. The puck took a wild bounce off the side boards and came right to Torres who wristed it low past Toskala.
The Sharks outshot the Oilers 12-10 in the second and 20-15 in the game overall through two periods.
It didn't take San Jose long to regain the lead early in the third period. 11 seconds in, Jonathan Cheechoo took a Nils Ekman pass into the Edmonton zone before finding Joe Thornton alone in front of the net. Thornton tapped the puck in to give his squad a 3-2 advantage.
Raffi Torres denied the Sharks a fourth goal when he did some backchecking, poking the puck out of harm's way after a centering attempt by Cheechoo but the Sharks went back on the attack just over a minute later and scored on a three-on-one opportunity.
Scott Hannan wristed one from the slot that was kicked out by Roloson but the rebound went right to Bernier who was perched at the side of the net and was able to deposit the puck in the open cage.
Six minutes into the period, the Oilers had a chance to get back in the game after Nils Ekman clipped Jason Smith with a high stick.
The Oilers were unable to convert on the man advantage and Roloson had to come up with his best save of the night just as the penalty expired, stoning Marleau on a breakaway.
With less than three minutes to go in the third, Bernier converted his second of the night after taking a Marleau pass from behind the net. His shot from the left slot beat Roloson low to make it a 5-2 game and clinch the outcome.
Dwayne Roloson got his first start as an Oiler, while Ville Nieminen played for San Jose. Both were acquired in transactions yesterday... Ales Hemsky
had his five-game scoring streak snapped.