updated stored procs to use AUTOMATION db