Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 High Availability (2008)
 Can't restore my own backup on another machine

Author  Topic 

J Trahair
Starting Member

15 Posts

Posted - 2013-07-12 : 05:12:26
Hi. I have 2 laptops, both with SQL v 10.50, one on xp 32bit, one on W8 64bit. I have backed up one database from the XP machine and tried to restore to the W8 machine.

RESTORE DATABASE PeripheryTMk_database FROM DISK = 'C:\All Users\PeripheryTMk.bak' WITH REPLACE

Error message below:

Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\PeripheryTMk.mdf'.
Msg 3156, Level 16, State 5, Line 1
File 'PeripheryTMk' cannot be restored to 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\PeripheryTMk.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\PeripheryTMk_log.ldf'.
Msg 3156, Level 16, State 5, Line 1
File 'PeripheryTMk_log' cannot be restored to 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\PeripheryTMk_log.ldf'. 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.

The database exists on both machines, the bak file exists at the stated location.

What do I need to do? Thank you in advance.

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2013-07-12 : 07:19:18
"Use WITH MOVE to identify"
Have you tried the restore with move? It sounds like a permission problem but try selecting where the files will be.

djj
Go to Top of Page

J Trahair
Starting Member

15 Posts

Posted - 2013-07-12 : 08:08:02
Thanks, I did that (along with the example from http://www.mssqltips.com/sqlservertutorial/122/retore-sql-server-database-to-different-filenames-and-locations/, and a lot of trial and error). It worked fine.

RESTORE DATABASE PeripheryTMk FROM DISK = 'C:\All Users\khfDB110713.bak'
WITH MOVE 'PeripheryTMk' TO 'C:\SQLData\PeripheryTMk_database_Data.mdf',
MOVE 'PeripheryTMk_Log' TO 'C:\SQLData\PeripheryTMk_database_Log.ldf'
Go to Top of Page

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2013-07-12 : 10:29:10
glad it worked.

djj
Go to Top of Page
   

- Advertisement -