I have an SQL server box on which I have created a large data transformation package. I want to make sure it is backed up in case of disaster.
I have looked through a few manuals and it looks as if I need to backup the msdb database to achieve this.
I have set up a scheduled job to backup the msdb database and have verified it using 'RESTORE VERIFYONLY'.
I would now like to test restoring the msdb.
The problem I have is that when I execute the restore from the Query Analyser, I get the error:-
Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
This is a test server and I am the only one on it trying to execute the restore. Do I have to put the server in a special state or something to be able to restore the msdb database?
The backup command:-
The restore command:-
Dazed and confused
(N+, MCP, MCAD)
I have looked through a few manuals and it looks as if I need to backup the msdb database to achieve this.
I have set up a scheduled job to backup the msdb database and have verified it using 'RESTORE VERIFYONLY'.
I would now like to test restoring the msdb.
The problem I have is that when I execute the restore from the Query Analyser, I get the error:-
Server: Msg 3101, Level 16, State 2, Line 1
Exclusive access could not be obtained because the database is in use.
This is a test server and I am the only one on it trying to execute the restore. Do I have to put the server in a special state or something to be able to restore the msdb database?
The backup command:-
Code:
BACKUP DATABASE [msdb] TO DISK ='TEST_BU1.BAK'
WITH INIT,
NOUNLOAD,
NAME='msdb test backup'
NOFORMAT;
The restore command:-
Code:
RESTORE DATABASE [msdb] FROM DISK ='TEST_BU1.BAK'
WITH NOUNLOAD, NOREWIND;
Dazed and confused
(N+, MCP, MCAD)