SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Operating System error 5(Access is Denied)


Operating System error 5(Access is Denied)

Author
Message
saidapurs
saidapurs
Old Hand
Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)

Group: General Forum Members
Points: 323 Visits: 414
Hi,
I tried your theory but no luck, still same problem...
saidapurs
saidapurs
Old Hand
Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)Old Hand (323 reputation)

Group: General Forum Members
Points: 323 Visits: 414
Hi,
Could you explain me, what are things you changed in Server & destination server.....

Thanks in advance...

Satish
jaylweb
jaylweb
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 6
saidapurs (10/23/2011)
Hi,
Could you explain me, what are things you changed in Server & destination server.....

Thanks in advance...

Satish


What errors are you getting?

If you are getting the Operating System error 5(Access is Denied) error, then it is a file permission issue. Go to Run and launch services.msc. Find your SQL services and look at the Log On As field. Make sure that user account has file permissions to the folder where the database resides. I am not a fan of using administrator for running services, but that is my preference.

If your Log On As account is in a domain, make sure you specify the domain name (Domain\LogOnAsUser)
vijayashankar.palanichamy
vijayashankar.palanichamy
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 65
Great It works for me thanks
Jim Lester
Jim Lester
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 16
I had the same problem. But All I had to do was create a new empty database, and restore to that with the overwrite option.
habeeb.matrix
habeeb.matrix
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 5
I had this issue and all the solutions online was kind of misleading to my issue. I have the solution here.
http://dotnet-programming-solutions.blogspot.com/2012/10/attach-database-encountered-operating.html
The solution was to Run SSMS as Administrator.
jaylweb
jaylweb
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 6
habeeb.matrix (10/17/2012)
I had this issue and all the solutions online was kind of misleading to my issue. I have the solution here.
http://dotnet-programming-solutions.blogspot.com/2012/10/attach-database-encountered-operating.html
The solution was to Run SSMS as Administrator.

I'm not sure why you were trying to give full rights to NETWORK SERVICE since you we're trying to attach a database as a logged on user. The user you were logged on as needed full rights to "C:\testApp\App_Data\MyDB.mdf" not NETWORK SERVICE.

I'm glad you found a work around for your situation. But for those having the "Error 5" issue via the running SQL service might need to resolve the file permission issue.
habeeb.matrix
habeeb.matrix
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 5
In most of the case, the issue must be resolved just by running SSMS as Administrator.
It might need Administrator privilege for file access.
Thanks and Regards,
Habeeb
http://dotnet-programming-solutions.blogspot.com
Hemant.R
Hemant.R
SSC-Enthusiastic
SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)SSC-Enthusiastic (126 reputation)

Group: General Forum Members
Points: 126 Visits: 240
hi , OS error 5 corrsponds to permissions issue on the file and folder paths.

plz change path & check.

Check for the privileges whenever you get such an error
Sinfonico25
Sinfonico25
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 167
Hello saidapurs, you must be careful when changing the service's login user; you must disable the "password expiration policy" from those users (local and destination server's users) in order to prevent issues when connecting to the share folder created on the destination server/PC. I highly recommend you to create an exclusively SQL Server Service's User to prevent this issue and other ones.

If you have a NAS you will not have this issue in public folders.

Hope it help you.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search