tweaks to script to source database on reporting server