All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
When a person makes a vow to do an act of obedience to Allaah, the Exalted, then he should fulfill it, and when one makes a vow to disobey Him, then he should not do so, and in this case it is incumbent on him to offer expiation like for breaking an oath. This applies to making such a vow in sacred places or anywhere else. However, relevant rewards and punishments are multiplied in sacred places. This is if you refer to Mecca by saying 'the sacred places' as mentioned in your question. If you mean the shrines and graves of pious people and the like, then know that making a vow to slaughter animal sacrifices in these places can be classified into two categories.
Firstly, the person might make the vow to offer an animal sacrifice and dedicate it to the person buried in this shrine or grave. This is shirk (polytheism) that takes the person out of the fold of Islam; may Allaah protect us.
Secondly, the person might make the vow to offer an animal sacrifice and devote it to Allaah, the Exalted, but make the vow in this place so as to seek blessings from it. This is considered a religious innovation.
As for the Sharee'ah ruling on slaughtering an animal sacrifice without mentioning the Name of Allaah upon it, if it was devoted to other than Allaah, the Exalted, then it is forbidden to eat from it. Allaah, the Exalted, says (what means): {Prohibited to you are dead animals, blood, the flesh of swine, and that which has been dedicated to other than Allaah …} [Quran 5:3]
If it was not dedicated to other than Allaah, the Exalted, then it can be classified into two categories:
Firstly, the person does not mention the Name of Allaah, the Exalted, while slaughtering the animal out of forgetfulness. The majority of Muslim scholars believe that in such a case it is permissible to eat from it. Allaah, the Exalted, says (what means): {… Our Lord, do not impose blame upon us if we have forgotten or erred…} [Quran 2:286] The Prophet, sallallaahu ‘alayhi wa sallam, said: "Verily, Allaah has pardoned for my community: their mistakes, their forgetfulness…" [Abu Dawood and others]
Secondly, the person deliberately abstains from mentioning the Name of Allaah, the Exalted, while slaughtering the animal sacrifice. The majority of Muslim scholars believed that it is impermissible for Muslims to eat from such an animal. Allaah, the Exalted, says (what means): {And do not eat of that upon which the Name of Allaah has not been mentioned, for indeed, it is grave disobedience...} [Quran 6:121] However, the Shaafi‘i scholars believe it to be permissible to eat from it because saying the Tasmiyah (i.e. mentioning the Name of Allaah, the Exalted) upon slaughtering an edible animal is just recommended according to their school of Fiqh. The preponderant opinion in this regard is that of the majority of scholars.
Allaah Knows best.