SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 High Availability (2008)
 Can't restore my own backup on another machine
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

J Trahair
Starting Member

15 Posts

Posted - 07/12/2013 :  05:12:26  Show Profile  Reply with Quote
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

USA
337 Posts

Posted - 07/12/2013 :  07:19:18  Show Profile  Reply with Quote
"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 - 07/12/2013 :  08:08:02  Show Profile  Reply with Quote
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

USA
337 Posts

Posted - 07/12/2013 :  10:29:10  Show Profile  Reply with Quote
glad it worked.

djj
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000