Cursing through restores | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Cursing through restores

I have a restore stored procedure that curses through a list of complete backups and restores them all. If there is an error restoring one of the backups, then it will fail on that particular restore, but continue through the cursor and restore the others that do not have any issues. If I run the stored procedure, everything works great. It can fail gracefully on one and move on. I scheduled the stored procedure to run in a job and when run within the job, if it fails on a certain restore, it will restore maybe one more database and then fail. I think it may have to do with printing errors, but I can’t find much info about that. Seems to me like QA handles printing errors and moving on better than jobs do. Please let me know if anyone has any ideas. Thanks,
Chris
Have you checked thru SQLAgent log or monitored the process using PROFILER in such case? Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>