Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server-2008
i want to restore database from file(Tasks->Restore->Database. atrer i select from device and select file) via sql server management studio. After that i get this error:
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\XXXXXX.mdf'. Msg 3156, Level 16, State 8, Server XXXX, Line 2

how to figure out this problem? is it security error?

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted 13-Apr-12 8:10am
Edited 13-Apr-12 9:03am
v3
Comments
OriginalGriff at 13-Apr-12 14:03pm
   
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
ryanb31 at 13-Apr-12 16:27pm
   
So, the error says access denied. Have you made sure there is sufficient permissions on the file itself and to wherever you are trying to restore to? The easiest way around it is to add the Everyone group with full control. After you are done remove the Everyone group.
Bernhard Hiller at 16-Apr-12 2:40am
   
Does the target file 'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\XXXXXX.mdf' already exist there?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Check your "mdf" file 'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\XXXXXX.mdf' location.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

It must be permission problems with your server.
Check if you have access to the server your database refers to.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Check permissions and Services.msi
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 325
2 ProgramFOX 265
3 Maciej Los 245
4 Andreas Gieriet 200
0 OriginalGriff 465
1 Sergey Alexandrovich Kryukov 275
2 ProgramFOX 265
3 Maciej Los 245
4 Andreas Gieriet 200


Advertise | Privacy | Mobile
Web01 | 2.8.150331.1 | Last Updated 9 Apr 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100