The sudden outburst began when Greening tipped in a shot 7:30 into the game and Daugavins quickly scored the second goal of his NHL career.
Craig Anderson saved 22 shots for the Senators, 12 coming in the final period, in what was Ottawa's third straight win. The streak has followed a five-game skid.
Nikolai Khabibulin started for Edmonton, but was replaced in the second period by Devan Dubnyk. The Oilers have lost four in a row and five out of six.
Ottawa has won in each of its last five trips to Edmonton.
Rosie O'Donnell unveils nearly 50-pound weight loss
Justin Bieber crashes Drake Bell's album release party