SQL program for logging admesh output