Sahih Bukhari Volume 9, Book 93, Hadith Number 497.

Narrated By Jundab : That he witnessed the Prophet on the Day of Nahr. The Prophet offered prayer and then delivered a sermon saying, “Whoever slaughtered his sacrifice before offering prayer, should slaughter another animal in place of the first; and whoever has not yet slaughtered any, should slaughter a sacrifice and mention Allah’s Name while doing so.”