use sql file rather than script and textfile