Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Operating System error 5(Access is Denied) Expand / Collapse
Author
Message
Posted Wednesday, May 16, 2007 10:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 6, 2007 2:21 PM
Points: 2, 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

Post #366456
Posted Wednesday, May 16, 2007 11:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 6, 2007 2:21 PM
Points: 2, 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

Post #366480
Posted Monday, July 2, 2007 6:30 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:39 AM
Points: 3,461, Visits: 350
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
Post #378190
Posted Friday, July 11, 2008 5:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 9, 2009 7:27 AM
Points: 4, 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
Post #532280
Posted Thursday, March 12, 2009 2:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 12, 2009 2:24 AM
Points: 1, Visits: 8
Thank you very very much.
you help me very nice
by
Post #673999
Posted Thursday, March 12, 2009 2:54 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:53 AM
Points: 6,364, Visits: 13,691
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"
Post #674009
Posted Friday, April 2, 2010 2:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 5, 2010 2:54 AM
Points: 1, 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>
Post #895488
Posted Tuesday, September 28, 2010 7:59 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 17, 2012 9:35 AM
Points: 4, 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.
Post #994465
Posted Thursday, December 16, 2010 4:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 20, 2014 7:46 AM
Points: 1, Visits: 36
Thank you Ryan.

My Access denied problem resolved.
Post #1035748
Posted Thursday, September 29, 2011 4:38 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, May 29, 2013 8:06 AM
Points: 167, Visits: 414
Hi Kumar,
I am able to access the share of destination....
Post #1183051
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse