In this paper we prove Hilbert Nullstellensatz for real coherent analytic surfaces and we give a precise description of the obstruction to get it in general. Refering the first, we prove that the ideals of global functions vanishing on analytic subsets are exactly the real saturated ones. For R 3 we prove that the real Nullstellensatz holds for real saturated ideals if and only if no principal ideal generated by a function whose zero set is a curve (indeed, a special function) is real. This led us to compare the Nullstellensatz problem with the Hilbert 17th one, also in its weaker form involving infinite sums of squares, proving that they share in fact the same obstruction.