Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

MSSQL:  Error restoring database to new server

Posted on 2009-04-30
11
Medium Priority
?
1,455 Views
Last Modified: 2012-05-06
Hi All,

I've taken a backup of our MSSQL 2005 Express database and am trying to restore it to a Virtual Machine.  But get the error below (see code).

SQL.HDR does exist and is on the correct path.

Any suggestions?
Event ID: 3634
Source: MSSQL$SQLEXPRESS
 
 
The operating system returned the error '5(error not found)' while attempting 'OpenForRestore' on 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wmsCatalog\SQL.HDR'.
 
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Open in new window

0
Comment
Question by:detox1978
  • 5
  • 3
  • 3
11 Comments
 
LVL 31

Accepted Solution

by:
James Murrell earned 1500 total points
ID: 24274928
Open a query window, use [master] and send a "restore database ..."statement to the engine. Check "restore database" statement in BOL, see option "with move". There is an example, about using "with move" option, that
you can use for guidance.

RESTORE
http://msdn2.microsoft.com/en-us/lib...5(SQL.80).aspx
0
 
LVL 2

Author Comment

by:detox1978
ID: 24274931
Can you check the link?
0
 
LVL 31

Assisted Solution

by:James Murrell
James Murrell earned 1500 total points
ID: 24274943
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
LVL 2

Author Comment

by:detox1978
ID: 24274974
I tried;

RESTORE Database wms
   FROM DISK = 'c:\wms-may09.bak'

but get the following error
Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '5(error not found)' while attempting 'OpenForRestore' on 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wmsCatalog\SQL.HDR'.
Msg 3156, Level 16, State 2, Line 1
File 'sysft_wmsCatalog' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\wmsCatalog'. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Open in new window

0
 
LVL 31

Assisted Solution

by:James Murrell
James Murrell earned 1500 total points
ID: 24275002
Use WITH MOVE

like

restore database Northwindrep
from disk = 'c:\northwind.bak'
with move 'Northwind' to 'c:\Northwindrep.mdf',
move 'Northwind_log' to 'c:\Northwindrep.ldf'
0
 
LVL 2

Author Comment

by:detox1978
ID: 24275023
I still get an error regarding SQL.HDR;



Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '3(error not found)' while attempting 'CreateFile' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\wmsCatalog2\SQL.HDR'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Msg 3634, Level 16, State 1, Line 3
The operating system returned the error '3(error not found)' while attempting 'CreateFile' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\wmsCatalog2\SQL.HDR'.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.


RESTORE database wms
   FROM DISK = 'c:\wms-may09.bak'
RESTORE DATABASE wms 
   FROM DISK = 'c:\wms-may09.bak'
   WITH MOVE 'wms' TO 'C:\MSSQL\wms.mdf',
   MOVE 'wms' TO 'C:\MSSQL\wms_log.ldf'
GO

Open in new window

0
 
LVL 13

Assisted Solution

by:St3veMax
St3veMax earned 500 total points
ID: 24277201
You need to verify the file and files are OK; do the following first:

RESTORE FILELISTONLY FROM DISK = 'c:\wms-may09.bak'

Look at the logical names you've given in the first col; then:

RESTORE DATABASE WMS
FROM DISK = ''
WITH MOVE '1stLogicalName' TO 'C:\Proggy Files\etc\YourFile_data.mdf'
,MOVE '2ndLogicalName' TO 'C:\Proggy Files\etc\YourFile_log.ldf'
,STATS = 1


HTH

0
 
LVL 31

Expert Comment

by:James Murrell
ID: 24277487
cheers St3veMax had to sleep
0
 
LVL 13

Expert Comment

by:St3veMax
ID: 24279335
No Worries James.
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 24279410
another ee member that knows my name LOL
0
 
LVL 13

Expert Comment

by:St3veMax
ID: 24279471
LinkedIn is a scary place ;o)
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question