I just want to thank you all. This issue was resolved. I restored the same database with a different name under the same instance about a month ago, this is just to have access to historical data. anyway the schedule was running the stored procedure in the active database and then running the same procedures in the restored database :hehe: