Brent Burns and Logan Couture also scored for the Sharks, who have won two straight since losing three in a row. Martin Jones stopped 33 shots.
Drake Caggiula, Matthew Benning and Oscar Klefbom scored for the Oilers, losers of two straight. Cam Talbot finished with 23 saves.
Burns' point shot through traffic gave the Sharks a 2-1 lead with 18 seconds in the opening period. Boedker then scored twice 6 1/2 minutes apart in the second to give San Jose a three-goal lead near the midpoint of the period.
Benning and Klefbom scored 2:23 apart early in the third to pull the Olers within one, but Couture put the Sharks up 5-3 at 5:06.