Click here to Skip to main content
12,998,423 members (71,099 online)
Rate this:
 
Please Sign up or sign in to vote.
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 7:10am
Updated 13-Apr-12 8:03am
v3
Comments
OriginalGriff 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 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 9 Apr 2014
Copyright © CodeProject, 1999-2017
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