JCAirey1 (4/21/2014)
Cool script. What happens if @AutoExecute AND @IncludeSystemDatabases are both equal to 1? 🙂
Hi JC,
In case @AutoExecute & @IncludeSystemDatabases both are set to 1, procedure will throw following error:
"AutoExecute cannot be used with system databases. Set @AutoExecute = 0 to print the restore commands for system databases & then restore them manually OR set @IncludeSystemDatabases = 0 to exclude system databases. "
I have done this on purpose, so that nobody accidently overwrites any of his\her system databases.
Thanks for asking.