May 28, 2011 at 9:08 pm
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.
May 28, 2011 at 9:41 pm
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.
May 28, 2011 at 9:49 pm
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
May 28, 2011 at 11:39 pm
Set the database single user mode with rollback immediate and restore it.
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
May 30, 2011 at 4:48 am
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