Catalyzes the reversible oxidation of 3-phospho-D-glycerate to 3-phosphonooxypyruvate, the first step of the phosphorylated L-serine biosynthesis pathway. Also catalyzes the reversible oxidation of 2-hydroxyglutarate to 2-oxoglutarate. (2R)-3-phosphoglycerate + NAD(+) = 3-phosphooxypyruvate + H(+) + NADH (R)-2-hydroxyglutarate + NAD(+) = 2-oxoglutarate + H(+) + NADH Amino-acid biosynthesis; L-serine biosynthesis; L-serine from 3-phospho-D-glycerate: step 1/3. Belongs to the D-isomer specific 2-hydroxyacid dehydrogenase family.