• J.Faehrmann (7/23/2014)


    If you set it to single user mode and some process connects to it before you start the restore, you will find it very difficult to disconnect that user.

    That is why I run the restore from the same session/proc that set it to single mode.

    I doubt if you will have a usable database if the restore fails, so there is really no point in not dropping it.

    Keeping the old db only works if the backup files are missing, else a working backup is truely needed 🙂

    "...That is why I run the restore from the same session/proc that set it to single mode..."

    Since you cannot be connected to the database when you restore, that would not prevent someone else from connecting to the database you are trying to restore. It is really just a matter of how often connections are made to the database.

    The same applies to dropping the database, but once the database is successfully dropped, no one can connect to it. If connections are made at a really high rate, it might be necessary to drop the database while it is offline and then delete the database files manually.