collect sql info