add stacktrace to sql query