I have run into a strange issue. I am trying to restore a database from one server to another. Below is an example of what i'm trying to run. This will run successfully. If I share out
the folders the data files are being written to and then remove the share privileges, the restore below fails. It also fails if I don't remove the share privileges after adding them. I'm not sure what's going on, I haven't
seen this before. running both SQL Server 2008 R2 and Windows Server 2008 R2. Let me repeat, the restore works until the folder is shared out, after that, I am unable to restore to the folder any more.
restore database testdb
from disk = 'c:\testdbbackup.bak'
MOVE 'test_data' TO
MOVE 'test_lost' TO
get the following messages:
Msg 3634, Level 16, State 1, Line 1
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:\DBDAT\TEST.mdf'.
Msg 3156, Level 16, State 5, Line 1
File 'test_data' cannot be restored to 'D:\DBDAT\TEST.mdf'. Use WITH MOVE to identify a
View Complete Post