A pig is any of the animals in the genus Sus, within the even-toed ungulate family Suidae. Pigs include the domestic pig and its ancestor, the common Eurasian wild boar (Sus scrofa), along with other species. Related creatures outside the genus include the peccary, the babirusa, and the warthog.
It depends on the way of using the vaccine.
If such vaccine is to be taken orally, it will Haraam to consume it.
But if it is not taken orally but injected in the body or dropped in the nose with out letting it go inside the stomach, then it will be allowed.
Anything taken from a pig is Najis and absolutely forbidden to consume.