Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Restoring MSDB - e0008492 - Database Query Failure

Created: 10 Jul 2013 • Updated: 12 Jul 2013 | 33 comments
This issue has been solved. See solution.

Hi,

Server: 2K Advanced

Symantec Backup Exec 10d

SQL 2k Add-in used

Our server had multiple hard drive failures on the day we wanted to retire it. I have managed the following restores,

1. Master database

2. User databases

However I am failing to restore the MSDB - it reaches 99% before the above error is displayed.

Byte count never increases past 0.

 

Steps I am following:

1. Putting the MSDB database into single user mode.

2.Taking existing database offline

3. Replace databases or filegroups

 

I desperately need to recover my DTS packages, please help!

Operating Systems:

Comments 33 CommentsJump to latest comment

Plateau222's picture

 

Job name            : Restore 00083
Job type            : Restore
Job status          : Failed
Job log             : C:\Program Files\VERITAS\Backup Exec\NT\Data\BEX_XXXXXX_00785.xml
Server name         : XXXXXX
Selection list name : Restore 00072

 

Device name         : Backup-to-Disk Device 1
Target name         : All Devices (XXXXXXX)
Media set name      : 

 

Error category    : Resource Errors
Error             : e0008492 - Database Query Failure. See the job log for details.

For additional information regarding this error refer to link V-79-57344-33938

 

Job Summary Information
Original start time : 09 July 2013 15:58:27
Job started         : 09 July 2013 15:58:31
Job ended           : 09 July 2013 16:17:07
Elapsed time        : 00:18:36
Files               : 0
Directories         : 0
Skipped files       : 1
Corrupt files       : 0
Files in use        : 0
Byte count          : 0 bytes
Job rate            : -1.00 MB/Min (Byte count divided by Elapsed time for job)

 

Set Detail Information - Restore \\XXXXX\
Set type               : Restore
Set status             : Completed
Set description        : 
Resource name          : \\XXXXX\
Logon account          : XXXX\XXXXXX
Error                  : e0008492 - Database Query Failure. See the job log for details.
Agent used                     : Yes
Advanced Open File Option used : No
Image used                     : No

Start time             : 09 July 2013 15:59:05
End time               : 09 July 2013 16:17:07
Files                  : 0
Directories            : 0
Skipped files          : 1
Corrupt files          : 0
Files in use           : 0
Byte count             : 0 bytes
Rate                   : 0.00 MB/Min
Media used             : B2D028031

 

Jaydeep S's picture

There actually are a lot of technotes available to help you troubleshoot and fix this issue. However, as you had mentioned disk failure, Have you confirmed if the SQL instance you are restoring to is the same version or later than the one you backed up from? Also, in the event viewer are you seeing any errors with relation to SQL VDI?

See if any of the below are aplicable and help

http://www.symantec.com/docs/TECH72460

http://www.symantec.com/docs/TECH35815

http://www.symantec.com/docs/TECH67379

http://www.symantec.com/docs/TECH28134

Plateau222's picture

Hi Jay,

I am the same version of SQL Server - fortunately the data was replicated to a hosted server. Which was the exact same version - so I was able to get the version number very easily which meant the master restored easily!

I don't understand the SQL VDI comment - can you expand please?

I was following this article http://www.symantec.com/business/support/index?page=content&id=TECH22575 which is not quite the same as our version of backup exec but is a good start.

Will review your links and respond back in 5

 

Thanks

Jaydeep S's picture

The technote that you are using should certainly be helpful. Also, on a quick thought, could you check if the database files are readonly (look in the OS)

What I meant was in the Windows event viewer, you might get some errors/warnings about SQLVDI corresponding to the restore. If we have something like this it would be helpful to troubleshoot as the 'database query failure' is a very generic error.

Plateau222's picture

Hi Jay,

the files were not read only.

Also one quick note - I have moved the server to our central location, however it can communicate with the new database server without issue.

Thanks

David

 

Plateau222's picture

SQL VDI - I have managed to find errors! No idea what this means!!

SQLVDI: Loc=SignalAbort. Desc=Client initiates abort. ErrorCode=(0). Process=1012. Thread=1792. Client. Instance=. VD=Global\msdb_00__758d2135_9c75_44f7_8bb3_6573cebc180a__SQLVDIMemoryName_0.

 

Plateau222's picture

http://www.symantec.com/docs/TECH72460

This gives me 3 subsequent links

http://www.symantec.com/business/support/index?page=content&id=TECH64494

I am not seeing anything different in the Application Log other than what I see on screen in veritas

 

http://www.symantec.com/business/support/index?page=content&id=TECH35815

I am not sure how to check the MDACs are in sync as the old server is not able to boot, but everything else looks good!

http://www.symantec.com/business/support/index?page=content&id=TECH28134

There is over 100GB of disk space, and the MSDB database is under 30Mb!

 

Plateau222's picture

my replies are a bit mesy but I have found SQLVDI errors, have never seen one of these before! So will run away and do some research, but this is all new to me!

Thanks

Plateau222's picture

Ok keeps not posting my replies!! Annoying!

I found the below link which sounds perfect
http://support.microsoft.com/kb/934396#appliesto

But the hotfix link does not include a fix for 2000 only 2005!

Jaydeep S's picture

If you have VDI error related to the time of the restore to get more details about the error, you might need to check the VDI.log file. This is normally in

<DriveName>\Program Files\ Microsoft SQL Server\SSQL\Log

Also see if this helps http://support.microsoft.com/kb/934396

Plateau222's picture

I was just about to reply with that link! However when I follow the get hotfix I only see 2005 listed?!

 

Cheers

Dave

Plateau222's picture

Hi Jay,

Found the following link via asking 4th line support (aka Google)

http://support.microsoft.com/kb/934396

However I am struggling to find the file for 2000, when I click get hotfix I am presented with a list that only list 2005 under product.http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=934396&kbln=en-us

 

 

plateau's picture

Found this link

FIX: Error messages and an event may be logged when you use the Virtual Device Interface in SQL Server 2005 or in SQL Server 2000

http://support.microsoft.com/default.aspx?scid=kb;EN-US;934396

 

However the hotfix link only seems to list 2005?!

 

Help!

Plateau222's picture

 

----------------------------------------------
2013/07/06 14:28:40 pid(1008) tid(1028)
Error on Global\master_00__3f48fde1_0108_4c82_8247_0937283ff095_
Error at CVDS::Close: Abnormal termination state

----------------------------------------------
2013/07/06 14:28:40 pid(1008) tid(1028)
Error on Global\master_00__3f48fde1_0108_4c82_8247_0937283ff095_
Error at TriggerAbort: invoked

----------------------------------------------
2013/07/06 17:20:43 pid(988) tid(400)
Error on Global\master_00__a525e291_4246_4d4b_897b_1401a1bd64da_
Error at SVDS::Open: Open(control) Status Code: 5, x5
Explanation: Access is denied.

 

----------------------------------------------
2013/07/06 17:20:45 pid(1008) tid(1580)
Error on Global\master_00__a525e291_4246_4d4b_897b_1401a1bd64da_
Error at CVDS::Close: Abnormal termination state

----------------------------------------------
2013/07/06 17:20:45 pid(1008) tid(1580)
Error on Global\master_00__a525e291_4246_4d4b_897b_1401a1bd64da_
Error at TriggerAbort: invoked

----------------------------------------------
2013/07/06 17:22:16 pid(988) tid(400)
Error on Global\master_00__76aa299a_3b3d_4b98_9dd2_b3e9e9115e34_
Error at SVDS::Open: Open(control) Status Code: 5, x5
Explanation: Access is denied.

 

----------------------------------------------
2013/07/06 17:22:18 pid(1008) tid(1424)
Error on Global\master_00__76aa299a_3b3d_4b98_9dd2_b3e9e9115e34_
Error at CVDS::Close: Abnormal termination state

----------------------------------------------
2013/07/06 17:22:18 pid(1008) tid(1424)
Error on Global\master_00__76aa299a_3b3d_4b98_9dd2_b3e9e9115e34_
Error at TriggerAbort: invoked

Jaydeep S's picture

Try if this link works for the SQL 2k hotfix http://support.microsoft.com/kb/935465

Also, have you tried re-registering the SQLVDI.dll Here are the steps -         
Stop all of the SQL Services.
Search for, and document the location of each instance of sqlvdi.dll.
Click Start, click Run, type Regsvr32 Path\SQLVDI.DLL in the Open box, and then click OK.
Reboot the SQL Server.

Plateau222's picture

Hi Jay, thanks I am on SQL 2000 sp4 - so is this still needed?

Jaydeep S's picture

Probabely yes as -

Prerequisites

  • SQL Server 2000 Service Pack 4 (SP4) 

    For more information about how to obtain SQL Server 2000 Service Pack 4, click the following article number to view the article in the Microsoft Knowledge Base:

    290211 How to obtain the latest SQL Server 2000 service pack

Plateau222's picture

Just a FYI my version of that DLL is 2000.85.2101.0 and that link was for 2000.85.2101.0. too.

Do you still think I should uninstall and re-register the file? I would be surprised if this file was corrupt as the server is a clean build and was only built on Saturday morning.

Thanks again

Jaydeep S's picture

Not sure about applying the patch again, but you could try re-registering none the less as we are getting errors about this VDI

Plateau222's picture

well I'm on 99% and 0 bytes after 12 minutes so I think this is going to fail again!

Plateau222's picture

Well it reached 5792 bytes before failing, so that's at least showing a bit of improvement.

Help!

Plateau222's picture

Job log

<?xml version="1.0" encoding="UTF-16"?>
-<joblog><job_log_version version="2.0"/> -<header><filler>====================================================================== </filler><server>Job server: FFSRVSHIBDATA </server><name>Job name: Restore 00095 </name><start_time>Job started: 10 July 2013 at 11:47:18 </start_time><type>Job type: Restore </type><log_name>Job Log: BEX_FFSRVSHIBDATA_00797.xml </log_name><filler>====================================================================== </filler></header><media_mount_date> Drive and media mount requested: 10/07/2013 11:47:18 </media_mount_date>-<media_drive_and_media_info><media_mount_date> Drive and media information from media mount: 10/07/2013 11:47:19 </media_mount_date><drive_name>Drive Name: Backup-to-Disk Device 1 </drive_name><media_label>Media Label: B2D028031 </media_label><media_guid>Media GUID: {27b012ae-11f3-45e5-9cc4-ce33330bb9f8} </media_guid><media_overwrite_date>Overwrite Protected Until: 31/12/9999 00:00:00 </media_overwrite_date><media_append_date>Appendable Until: 31/12/9999 00:00:00 </media_append_date></media_drive_and_media_info>-<restore><filler>====================================================================== </filler><title>Job Operation - Restore </title><filler>====================================================================== </filler>-<machine><machine_name>HBSRVSQL</machine_name><info>Network control connection is established between 10.44.1.177:60348 <--> 10.44.3.15:10000 </info><info>Network data connection is established between 10.44.1.177:60357 <--> 10.44.3.15:1305 </info>-<set><set_resource_name>HBSRVSQL </set_resource_name><restore_target_device>Restoring data to HBSRVSQL . </restore_target_device><tape_name> Storage Media #1: " Media created 01/07/2013 17:30:03 " Backup performed on 01/07/2013 at 17:37 Backup set #1: " Daily Backup " </tape_name><start_time>Restore started on 10/07/2013 at 11:47:54. </start_time><database/>-<OperationErrors Type="db_query_failure"><UMI>V-79-57344-33938</UMI> - An error occurred on a query to database msdb. </OperationErrors>-<OperationErrors Type="error"><UMI>V-79-57344-33938</UMI> - The backup of the system database on device msdb_00__620982d9_030d_4c73_9322_abf0cb1a7169_ cannot be restored because it was created by a different version of the server (134219794) than this server (134220007). </OperationErrors><end_time>Restore completed on 10/07/2013 at 12:15:39. </end_time>-<summary><restored_databases>Restored 1 databases </restored_databases><file_skipped_stat>1 item was skipped. </file_skipped_stat><new_processed_bytes>Processed 5,792 bytes in 27 minutes and 45 seconds. </new_processed_bytes><vlm_hist_rateformat2>Throughput rate: 0.000 MB/min </vlm_hist_rateformat2></summary><filler>---------------------------------------------------------------------- </filler></set></machine></restore>-<footer><filler>====================================================================== </filler><end_time>Job ended: 10 July 2013 at 12:15:40 </end_time><engine_completion_status>Job completion status: Failed </engine_completion_status><filler>====================================================================== </filler><completeStatus>6</completeStatus><errorDescription>Final error: 0xe0008492 - Database Query Failure. See the job log for details. </errorDescription><errorCategory>Final error category: Resource Errors</errorCategory><umiOriginator>79</umiOriginator><justErrorCode>-536836974</justErrorCode></footer></joblog>

Plateau222's picture

I assume this different version of server refers to the OS rather than SQL server?

As I thought my version of server was 8.00.2279 - SP4 - Standard Edition - which I obtained via the below, which is identical to the server I replicate too.

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Jaydeep S's picture
"same version of SQL Server - fortunately the data was replicated to a hosted server"
 
Could you try to get the version of SQL Server by running SELECT @@VERSION on one of the replicated or original servers that you had and match it with the Server that you are restoring to?
 
The error you are getting is very typical to this issue.
 cannot be restored because it was created by a different version of the server (134219794) than this server (134220007).
 
If this is not possible, on the SQL server and backup exec server go to the registry at the following path
HKLM\SOFTWARE\Symantec\Backup Exec For Windows\Backup Exec\Engine\Logging\ amd set the following value
CreateDebugLog = 1 
Restart the Backup Exec services on Media Server and restart the remote agent on SQL Server and run the job.
Once the job completes, browse to Backup Exec \ Logs folder on Media Server and Backup Exec \ RAWS \ Logs folder on the SQL Server and locate servername-beremoteXX.log files.
 
Once you have located the files zip them and attach here on forum or email me to my direct email address. I am sending you a DM with my email address.

Plateau222's picture

Microsoft SQL Server  2000 - 8.00.2279 (Intel X86)
 Nov  7 2008 01:21:38
 Copyright (c) 1988-2003 Microsoft Corporation
 Workgroup Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

This is the replicated server, the original server won't boot!

Thanks

Plateau222's picture

Hi Jay,

Have made the registry changes to both servers as discussed - the path is slightly different it mentions veritas rather than symantec - I'm not saying this to nitpick rather I want this thread to be as useful as possible for anyone else who has the same issue.

I am now attempting to restore again!

Again thanks, must admit I didn't expect to get this level of support from you guys!

Plateau222's picture

The SQL server has the agent installed at C:\Program Files\VERITAS\Backup Exec\RANT - just wanted to check as I do not know the difference between RANT and RAWS.

Thanks again

Plateau222's picture

Ok have resolved this, I will attempt to summarise for anyone else going through restore hell

Everytime I restored the data, it failed due to the SQL version - despite it appearing to be the same version. I think this was caused by applying hotfixes that may no longer be available to my old server, the restore master database possibly thought the server was this version and not the version displayed on the SQLserver.exe or displayed in Enterprise Manager.

What we did was to

1. Create a new SQL 2k server

2. Install SP3

3. Restore MSDB to this server

4. Detach this database.

5. Detach the production MSDB

6. Rename the production MSDB files

7. Copy the restore MSDB files to the production server.

8. Attach the msdb database

9. Restarted the services

 

Everything is working great! So in summary of how I/we restored the SQL data

1. Install OS

2. Install SQL server

3. Install SPs

4. Restore user database via SQL add-in

5. Restore master database via the replace master option in SQL options

6. MSDB: see above

 

So a million thanks to Jay for helping me with everything, I never expected this level of support for an old version of Backup Exec, and an old version of MS SQL - it seems like Symantec really attach a high level of care for their customers.

Jay have seen no questionnaire to thank you but have sent a PM to the official Symantec facebook page.

This thread can be closed now.

Jaydeep S's picture

Glad we could help. You could mark a post in the thread as solution and close it out.

SOLUTION