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
Ryan Wellman
Ryan Wellman
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 1

I am an intern working with two SQL Server 2005 instances on two Windows Server 2003. The servers are linked via crossover. I am using this setup to practice my log shipping before I move to the production databases. I am using the wizard to complete the log shipping. The primary server SQLCOM1 is to backup and restore the DB on the secondary server SQLCOM2\SQL_Data using the default folders after the restore. SQLCOM2\SQL_Data has been shared and I have permissions for most of the default SQL groups as well as a user 'connect' and the local admin. When I go to execute the log shipping it throws the following:

BackupDiskFile::CreateMedia: Backup device '\\SQLCOM2\SQL_Data\AdventureWorks.bak' failed to create. Operating system error 5(Access is denied.).

I am working with SQL Server 2005 Enterprise Edition SP1. (SP1 to replicate the production servers.)

Additional info:

I am logged in as Administrator on both machines.
The Share Permissions has the following groups or user names:
Administrator(SQLCOM2\Administrator)
connect(SQLCOM2\connect)
Everyone
NETWORK
NETWORK SERVICE
Remote Desktop Users(SQLCOM2\Remote Desktop User)
SERVICE
SQLServer2005MSFTEUser$SQLCOM2$MSSQLSERVER
SQLServer2005MSSQLUser$SQLCOM2$MSSQLSERVER
SQLServer2005AgentUser$SQLCOM2$MSSQLSERVER
SYSTEM

Each of these users\groups has full control permissions.

Thanks for any help,
Ryan


Ryan Wellman
Ryan Wellman
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 1
Sweet!

I changed the "log on as" to .\Administrator for SQL Server (MSSQLSERVER) and SQL Server Agent (MSSQLSERVER). In the SQL Server Configuration Manager and ran the Log Shipping wizard and all is well!

Thank you very much for reading,
Ryan


Sugesh Kumar
Sugesh Kumar
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4547 Visits: 358
OS error 5 corrsponds to permissions issue on the file and folder paths. Check for the privileges whenever you get such an error.

Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
Horizon-717000
Horizon-717000
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 20
Hi,
i'm also having same problem..
Here is the error , which i get while i attempt to restore my database:

restored failed for server 'Horizon\sqlexpress' (Microsoft.SqlServer.Express.Smo)

Additional Information:
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\exper35_ExpertZoo.ldf' (Microsoft.SqlServer.Expres.Smo)

I have attempted un-checking the ReadOnly attribute from the files and folders on this path. But, ReadOnly attribute of folders gets back to Checked as soon as i remove it. I attempted the procedure given here to permanently uncheck this attribute But it can work only for files, not folders.
Can anyone please help me in this regard? I'm simply stuck on this issue.
Thanks in advance
hamed.mortazi
hamed.mortazi
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 8
Thank you very very much.
you help me very nice
by
Perry Whittle
Perry Whittle
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20268 Visits: 17244
Ryan Wellman (5/16/2007)
Sweet!

I changed the "log on as" to .\Administrator for SQL Server (MSSQLSERVER) and SQL Server Agent (MSSQLSERVER). In the SQL Server Configuration Manager and ran the Log Shipping wizard and all is well!

Thank you very much for reading,
Ryan

its bound to work running as an admin!
as well as the share permissions did you check\set the security permissions too. This is most likely where the error 5 is being thrown from

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
sara_guru21
sara_guru21
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 1
Ryan Wellman (5/16/2007)
<SPAN class=spnMessageText id=msg><FONT color=#191970>Sweet!

I changed the "log on as" to .\Administrator for SQL Server (MSSQLSERVER) and SQL Server Agent (MSSQLSERVER). In the SQL Server Configuration Manager and ran the Log Shipping wizard and all is well!

Thank you very much for reading,
Ryan</FONT>
</SPAN>

jaylweb
jaylweb
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 6
We had the same "error5(Access is Denied)" message. I discovered the "logon as" account had lost its rights to the folder the backups were going to. I granted full rights and then the job executed with no errors.

So make sure that your SQL account has the rights to write the backup, whether it be local or a remote share.
lokeshsp
lokeshsp
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 38
Thank you Ryan.

My Access denied problem resolved.
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 Kumar,
I am able to access the share of destination....
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