Home Forums SQL Server 2014 Development - SQL Server 2014 Script to stop service using XP_CMDSHELL, restore full and differential .bak files in a single script RE: Script to stop service using XP_CMDSHELL, restore full and differential .bak files in a single script

  • Jeff Moden (7/22/2016)


    It's just easier for me to ensure that right after I bounce everyone out with a single user connection that I immediately shift back to something a bit less dangerous and immediately follow that with the restore command quickly enough so nothing else actually does get back in. If I lose that connection during a panic restore, then there will be a real panic and I'm just not willing to take the chance. Been there once and don't want to ever go through that again.

    This is the bit I don't understand. Why is MULTI_USER less dangerous when you're about to overwrite the database anyway? If someone else jumps in after you lose the connection, don't you just start again? When this happened to you, what were the consequences - lost data, hours of extra work, or something else?

    Thanks

    John