Improvements to sql utility scripts.