Restore DB in Prod hours

  • How to restore backup in production hour

    with minimul affect to connceted user to the database?

    I have to do this task online.

  • restore database abc from disk ='backup location'

    OR

    You can use SSMS also for this task.

    it would be unavailable for users till the time it gets restore, time depends on the size and available resources on the server.

    Cheers!

    DG

  • Thanks for your reply but i am worried.I can see lot of users are connected to this user database.

    I don't want to kill their spid. So is there any way so that no new user can connect to this database and also connected users won't get affected?

  • I am afraid in restoring stage users can’t access database, i would suggest to restore it the time it is minimum used.

    Thanks,

    DG

  • You will have to have exclusive access to the current DB to modify/overwrite/delete it.

    This means you will have to close all current connections to it before changing it.

    You could however:

    Restore the new DB as a different name: Production_New

    Once it is done, close all connections to the old one, and rename/delete it.

    Rename the Production_New to Production (or whatever name you need it)

    This should cut your downtime significantly.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Yes, this can also be a good approach. But in any case users will be kicked off for a while.

    But in this case the downtime would be minimum

    thanks,

    DG

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply