Mark Cavendish (Etixx-Quick Step) was close behind in second place, and retains his overall lead in the race.
Andrea Guardini (Astana) opened hostilities by starting his sprint early, but Viviani and Cavendish waited patiently on his wheel before passing him in the final metres.
All three of their teams had a turn at the front in the final few kilometres, while John Degenkolb’s Giant-Alpecin were less of a presence, and the German could only manage sixth place.
Prior to the sprint, it was an uneventful day. A break of three escaped the peloton early on, of which Tunisian Rafaa Chtioui (SkyDive) was the last survivor, riding ahead of the race on his own before being caught with 10km to go.
Strong winds did cause some echelons early on, but nothing particularly substantial and the race all came back together.
Dubai Tour 2015, stage two: Dubai International Marine Club to Palm Jumeirah (Atlantis), 187km
1. Elia Viviani (Ita) Sky
2. Mark Cavendish (GBr) Etixx-QuickStep
3. Andrea Guardini (Ita) Astana
4. Alexander Porsev (Rus) Katusha
5. Andrea Palini (Ita) Skydive Dubai
6. John Degenkolb (Ger) Giant-Alpecin
7. Daniele Ratto (Ita) UnitedHealthcare
8. Daniel Oss (Ita) BMC Racing
9. Michael Valgren Andersen (Den) Tinkoff-Saxo
10. Nicola Ruffoni (Ita) Bardiani CSF all same time
Overall classification after stage two
1. Mark Cavendish (GBr) Etixx-QuickStep