Catalyzes the dehydrogenation of (R)-2-hydroxyglutarate (D-2-hydroxyglutarate or D-2-HG) to 2-oxoglutarate and of (R)-malate (D-malate) to oxaloacetate. Is functionally tied to L-serine biosynthesis, via its coupling with the D-3-phosphoglycerate dehydrogenase SerA, encoded by the adjacent gene in the locus. Is required for the utilization of D-2-hydroxyglutarate as well as D-malate as the sole carbon source for growth of P.stutzeri. Active in vitro with artificial electron acceptors such as 2,6-dichlorophenolindophenol (DCPIP) and appears to couple with electron transfer flavoprotein (ETF) for efficient oxidation of both D-2-hydroxyglutarate and D-malate in vivo. Cannot catalyze the oxidation of L-2-hydroxyglutarate, D-lactate, D-tartrate, D-2-hydroxybutanoate, D-mandelate, D-glycerate and D-phenyllactate. (R)-2-hydroxyglutarate + A = 2-oxoglutarate + AH2 (R)-malate + A = AH2 + oxaloacetate Binds 1 FAD per subunit. Activated by Zn(2+) ions at low concentrations (10 uM) and inhibited by Zn(2+), Fe(2+) and Ni(2+) at high concentrations (10 mM). kcat is 7.9 sec(-1) with D-2-hydroxyglutarate as substrate and DCIP as the electron acceptor (at pH 7.4 and 37 degrees Celsius). kcat is 13.0 sec(-1) with D-2-hydroxyglutarate as substrate and electron transfer flavoprotein (ETF) as the electron acceptor (at pH 7.4 and 37 degrees Celsius). kcat is 1.45 sec(-1) with D-2-hydroxyglutarate as substrate and cytochrome c as the electron acceptor (at pH 7.4 and 37 degrees Celsius) (PubMed:28827360). kcat is 11.7 sec(-1) with D-malate as substrate and DCIP as the electron acceptor (at pH 7.4 and 30 degrees Celsius) (PubMed:30131334). Homodimer. Expression is up-regulated by exogenously added D-2-hydroxyglutarate or D-malate. The deletion mutant is barely able to use D-2-HG for growth and displays a relatively slower growth in a medium containing glucose. Cells lacking this gene also show high accumulation of extracellular and intracellular D-2-HG (PubMed:28827360). Moreover, the mutant strain loses the ability to utilize D-malate for growth (PubMed:30131334). Belongs to the FAD-binding oxidoreductase/transferase type 4 family.