Rate-limiting enzyme of the hexosamine biosynthetic pathway (HBP) that catalyzes the formation of glucosamine-6-phosphate from fructose-6-phosphate and glutamine, thereby controlling the flux of glucose into this pathway (PubMed:35229715). Via control of the HPB, likely regulates the availability of precursors for N- and O-linked protein glycosylation (By similarity). Exhibits feedback inhibition by UDP-N-acetylglucosamine (UDP-GlcNAc), although to a lesser extent than GFPT1 (PubMed:35229715). {ECO:0000250|UniProtKB:Q06210, ECO:0000269|PubMed:35229715}. This is the function of GFPT2 (glutamine--fructose-6-phosphate transaminase 2, Ensembl gene identifier ENSG00000131459).