This hadith shows that it is part of the sunnah to mention those the sacrifice has been made on behalf:
"I attended the Eid Al-Adha' with the Prophet (ﷺ) at the Musalla. When he finished his Khutbah, he descended from his Minbar and was given a male sheep. The Messenger of Allah (ﷺ) slaughtered it with his hand and said: 'Bismillah, Wa Allahu Akbar, this from me and whoever does not slaughter from my Ummah.'"
(Jami' at-Tirmdihi, Sunan abi Dawod, Sunan ad-Darqatotni, al-Mustadrak, Musnad Ahmad, and As-Sunan al-Kubra of imam al-Bayhaqi who counted several sahaba () having narrated this, you may find it with a slightly different wording in other sunnah compilation like here in Sunan ibn Majah)
The prophet () here has sacrificed on behalf of those who are unable to make a sacrifice from his Ummah (and clearly mentioned it). This is used as an evidence to do the same in case one is sacrificing on behalf of his family or others!
The hadith also shows that it is not necessary to sacrifice for each member of the family (addressing the Hanafi view). As stated in 'Awn al-Ma'bud the commentary of Sunan abi Dawod of al-Aabadi محمد شمس الحق العظيم آبادي.
Therefore:
The Sunnah for one who wants to slaughter the udhiyah is to say when slaughtering it:
Bismillaah, wa Allaahu akbar, Allaahumma haadha minka wa laka, haadha ‘anni (or if it is being offered on behalf of someone else, haadha ‘an [fulaan]), Allaahumma taqabbal min [fulaan] wa aali [fulaan].
(In the name of Allaah, Allaah is most great. O Allaah, this is from You and to You. This is on my behalf (or if it is being offered on behalf of someone else, This is on behalf of [So and so]). O Allaah, accept (this sacrifice) from [So and so] and the family of [So and so]) – here he should mention his name instead of [fulaan] or [So and so]. (islamqa #36733)
Usually one doesn't mention the name of a single person -unless this is part of the wakala (procuration)-, but includes the family too as stated in the hadith mentioned above.
Nevertheless it is not obligatory to say this the most necessary part is to mention Allahs name on it (Evidences from the Qur'an: 5:4, 6:118, 6:121, 22:34 and 22:36) by saying "Bismillah" (this is the most recommended option after saying it as the prophet () did: "Bismilah Allahu Akbar") or "Allahu Akbar" or whatever can be used as a praise of the lord. Also note that if one forgets to do this it might be acceptable, but if not it is rather considered haram to eat based on (6:121).
Note that sacrifice on behalf of a dead person is allowed if this person asked for it (if it was a will or waqf from his money) and it is allowed if you intended to sacrifice for your family and had your dead family members in mind, but it is not part of the sunnah to specify a sacrifice for a dead person.