cancel
Showing results for 
Search instead for 
Did you mean: 

SQL related restore error

coolcsgeek
Level 3

hi guys,

I got the following error.

Click an error below to locate it in the job log
Restore- XXXXX-V-79-57344-33938 -
An error occurred on a query to database xxxx.
V-79-57344-33938 - Exclusive access could not be obtained because the database is in use.
V-79-57344-33938 -
An error occurred on a query to database xxxx.
V-79-57344-33938 - Exclusive access could not be obtained because the database is in use.
V-79-57344-33938 -
An error occurred on a query to database xxx.
V-79-57344-33938 - Exclusive access could not be obtained because the database is in use.
V-79-57344-33938 -
An error occurred on a query to database xxxx.
V-79-57344-33938 - Exclusive access could not be obtained because the database is in use.
V-79-57344-33938 -
An error occurred on a query to database master.
V-79-57344-33938 - RESTORE DATABASE must be used in single user mode when trying to restore the master database.

it sounds like, to restore the data, I need to turn off the SQL service. But what I don't understand is that I am restoring the data from the backup tape to a external hard disk that is connected with USB to the server where backup exec 10d server is installed. So, I don't think SQL service wouldn't affect the data at all while restoring. Am I missing anything here? is there any settings to restore?

Thank you in advance.
1 REPLY 1

Gilly-Bhoy
Level 6
Partner
Hi,

Just to be clear. Are you performing a full restore of all the SQL in this instance - including the Master?
If so then you must restore the master database only first! To do this (if it's SQL 2000) you need to stop the MSSQL service and start it in single user mode using the -m switch in the parameter field of the service properties.
Then you need to go to the SQL tab in your restore job and tick "Automate master database restore"

Once the master is successfully restored you can then restore all the other databases except the master.

If the version of SQL is 2005 or 2008 I don't think you need to start the service in single user mode.

Good Luck
Gilly