Sahih al-Bukhari, Book 97, Hadith 29 (In-Book)

Narrated 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."

حَدَّثَنَا حَفْصُ بْنُ عُمَرَ، حَدَّثَنَا شُعْبَةُ، عَنِ الأَسْوَدِ بْنِ قَيْسٍ، عَنْ جُنْدَبٍ، أَنَّهُ شَهِدَ النَّبِيَّ صلى الله عليه وسلم يَوْمَ النَّحْرِ صَلَّى ثُمَّ خَطَبَ فَقَالَ ‏ "‏ مَنْ ذَبَحَ قَبْلَ أَنْ يُصَلِّيَ فَلْيَذْبَحْ مَكَانَهَا أُخْرَى، وَمَنْ لَمْ يَذْبَحْ فَلْيَذْبَحْ بِاسْمِ اللَّهِ ‏" ‏‏.‏

sunnah.com