In this paper the most general H2 control problem is considered. We derive necessary and sufficient conditions when the infimum is attained by state feedback. We do the same for the measurement feedback case where we derive necessary and sufficient conditions when the infimum is attained by proper dynamic compensators. We also investigate reduced-order compensators if some states are observable without noise. We discuss, for all of these cases, the freedom that the non-uniqueness of optimal compensators gives us in assigning the closed-loop eigenvalues. The second half of this paper investigates the case when the infimum cannot be attained. We give a constructive algorithm to find a minimizing sequence of stabilizing controllers and discuss the freedom in the asymptotic locations of the closed-loop eigenvalues. Again we do the above for three different cases: static-state feedback, full-order measurement feedback and reduced-order measurement feedback.