Pyridoxal-5'-phosphate (PLP)-dependent enzyme that catalyzes the synthesis of D-serine from L-serine (PubMed:20106978, PubMed:23391306, PubMed:29277459). D-serine is a key coagonist with glutamate at NMDA receptors. In addition to racemization, has dehydratase activity towards both L-serine and D-serine, a two-step reaction in which the hydroxyl group of serine is eliminated to produce aminoacrylate (2-aminoprop-2-enoate), and then the aminoacrylate (an unstable intermediate) is deaminated by nonenzymatic hydrolysis to produce pyruvate (By similarity). {ECO:0000250|UniProtKB:Q9QZX7, ECO:0000269|PubMed:20106978, ECO:0000269|PubMed:23391306, ECO:0000269|PubMed:29277459}. This is the function of Ensembl gene identifier ENSG00000167720 (SRR, serine racemase).