What is the oxidation number for Ba?

Barium typically displays a $+ I I$ oxidation state in its compounds.
Barium salts, $B a {X}_{2}$, clearly have an oxidation state of $+ I I$. Neutral barium metal, of course has a $0$ oxidation state, as it has neither donated nor accepted electrons.
That barium takes a $+ I I$ oxidation state, is entirely consistent with its position in Group 2 of the Periodic Table, i.e. 2 valence electrons, which the metal LOSES when it forms an ionic compound.