Back up restore question

  • I have to run a BACKUP restore (full replace).

    The MSSQL 2008 R2 Web database has 5 agent jobs running at different intervals during the day.

    I guess I must turn these offbefore I do a the restore ?

    Whats the correct way to handle this ? What steps should I restore a .bak file with REPLACE selected.

  • Yes,you can turn off if you want to ,but once restore starts successfully ,at that time if one of job tries to run in mid time (i.e. if you don't have turn off job)while database restoring then it will fail.

  • Digs (5/28/2011)


    What steps should I restore a .bak file with REPLACE selected.

    you can following TSql Command to Restore Database with TSql Command.

    USE master

    RESTORE DATABASE Sandbox--YourDatabaseName

    FROM DISK='D:\SQL SERVER\Lab\Backup\Backup_20110529_0903_Full.bak'--your backupFile Path.

    WITH REPLACE

  • Set the database single user mode with rollback immediate and restore it.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • another solution is Stop the Agent Service if jobs are not critical and you can restrict the SQL Agent service account to access the replace database

    Regards,
    Syed Jahanzaib Bin Hassan
    BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA

    My Blog
    www.aureus-salah.com

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

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