WASHINGTON — The Justice Department on Wednesday ordered a federal review of a database that is used to check gun buyers’ backgrounds, after a man who shot and killed more than two dozen people at a Texas church this month was omitted from the system despite a criminal record.

Attorney General Jeff Sessions said he was asking the F.B.I. and the Bureau of Alcohol, Tobacco, Firearms and Explosives to conduct a comprehensive review of the database, known as the National Instant Criminal Background Check System.

Mr. Sessions said in a statement that the shooting in Sutherland Springs, Tex., showed that “relevant information may not be getting reported” to the database and that the agencies needed to determine “the steps we can take to ensure that those who are prohibited from purchasing firearms are prevented from doing so.”

The suspect in the shooting, Devin P. Kelley, a former Air Force serviceman, had served 12 months’ confinement after striking and choking his first wife and breaking the skull of his young stepson. Federal law prohibits selling a gun to a person who has been convicted of a crime involving domestic violence against a spouse or child.