• Excellent script! Worked great but I had to execute it twice. One important tip: insert the "pause" DOS command before any "exit" commands, otherwise your command window will close before you get a chance to read enough of the output. I had opened a cmd window and then executed it inside of that, thinking that when it finished it woud leave me in the original cmd window, but unfortunately it closed that as well when it exited and I had nothing to look at.

    Before the DOS window closed, I also got an error that my account couldn't access the database while in single user mode. Then I realized what else was accessing the server: don't forget to close SQL Management Studio if you have it open, lol.

    I commented everything out that didn't refer to the mssqlsystemresource database and ran it again (after closing SQL Mgmt Studio) and it completed successfully.

    Thanks again for a wonderful script! But please resubit a version that doesn't close the window when it exits (or at least inseart the pause commands).

    Steve