SQL Agent: Restore of Microsoft x64 SQL2005 Master database fails with the error "An error occurred on a query to database master" if the option "Automate master database restore" is selected.

Article:TECH47815  |  Created: 2006-01-15  |  Updated: 2012-01-06  |  Article URL http://www.symantec.com/docs/TECH47815
Article Type
Technical Solution

Product(s)

Problem



SQL Agent: Restore of Microsoft x64 SQL2005 Master database fails with the error "An error occurred on a query to database master" if the option "Automate master database restore" is selected.


Error



An error occurred on a query to database master.

If "Automate master database restore" option was being selected, the restore job of "master" database of x64 SQL2005 might fail with the above error.

The remote agent debug log will indicate the following error:
"Exclusive access could not be obtained because the database is in use"
 


Solution



Upgrade to Backup Exec 11d or above.

Workaround:

Start the SQL Server instance in Single user mode and resubmit the restore operation as given below:

1. Manually restart the SQLServer instance in Single user mode.
Example: sqlservr.exe -c -m
 
2. Wait for several seconds until the instance is in stable condition.

3. Modify the SQL properties of the restore job as follows:
- Deselect the option "Automate master database restore" from the Restore Job properties. (Figure 1)
Figure 1
 
 
- Select "Overwrite the existing database" from Tools|Options|Job Defaults|Microsoft SQL. (Figure 2)
Figure 2
 

4. Run the restore job.

Supplemental Materials

SourceError Code
Value0xe0008492
Description

Database Query Failure. See the job log for details.


SourceETrack
Value593387
Description

automatic master DB recovery fails for SQL2005 on x64



Legacy ID



283384


Article URL http://www.symantec.com/docs/TECH47815


Terms of use for this information are found in Legal Notices