The staff sergeant, accused of directing another employee to search the jail’s inmate database, intends to fight the allegations, his lawyer said.