This paper proposes a new approach to determine H2 optimal control for discrete-time linear systems, based on convex programming. It is shown that all stabilizing state feedback control gains belong to a certain convex set, well-defined in a special parameter space. The Linear Quadratic Problem can be then formulated as the minimization of a linear objective over a convex set. The optimal solution of this convex problem furnishes, under certain conditions, the same feedback control gain which is obtained from the classical discrete-time Riccati equation solution. Furthermore, the method proposed can also handle additional constraints, for instance, the ones needed to assure asymptotical stability of discrete-time systems under actuators failure. Some examples illustrate the theory.