Sunan an-Nasa'i, Volume 4, Book 35, Hadith 3797 (DarusSalam) ⓘ
It was narrated from Salim, from his father, that on one occasion the Prophet heard 'Umar saying: "By my father and by my mother." He said: "Allah forbids you to swear by your forefathers." 'Umar said: "By Allah, I never swore by them again, whether saying it for myself or reporting it of others."
أَخْبَرَنَا عُبَيْدُ اللَّهِ بْنُ سَعِيدٍ، وَقُتَيْبَةُ بْنُ سَعِيدٍ، وَاللَّفْظُ، لَهُ قَالاَ حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، عَنْ أَبِيهِ، أَنَّهُ سَمِعَ النَّبِيُّ صلى الله عليه وسلم عُمَرَ مَرَّةً وَهُوَ يَقُولُ وَأَبِي وَأَبِي . فَقَالَ " إِنَّ اللَّهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ " . فَوَاللَّهِ مَا حَلَفْتُ بِهَا بَعْدُ ذَاكِرًا وَلاَ آثِرًا .
also referenced under: Hadith 3766 (Reference) & Book 35, Hadith 6 (In-Book)