• Hi,

    I'm managing 10 SQL Servers here with around 10 to 30 DB each. I'm having a hard time to setup a script to automatically backup all database (user and system DB) at once.

    I tried both scripts: SP_MSforeachdb and the script with a cursor. I faced the same problem with both script, sometimes it works great but some other times, the job completes after backing-up 2 or 3 DB leaving all other DB not backed-up and I really don't understand why...

    I did some debug of the script with the cursor, sometime it ends before the end when the "fetch next" returns some blanks instead of the DB name, with the fetch_status = -2

    I really appreciate you help!

    Etienne