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

Operating system error 5(Access is denied.) to master.mdf'' Expand / Collapse
Author
Message
Posted Wednesday, April 4, 2007 2:44 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, August 4, 2013 11:06 AM
Points: 397, Visits: 548

having trouble restarting sql server service. here is what I see in the error log... any ideas?

2007-04-04 16:34:16.31 Server      Microsoft SQL Server 2005 - 9.00.3042.00 (X64)
 Feb 10 2007 00:59:02
 Copyright (c) 1988-2005 Microsoft Corporation
 Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

2007-04-04 16:34:16.31 Server      (c) 2005 Microsoft Corporation.
2007-04-04 16:34:16.31 Server      All rights reserved.
2007-04-04 16:34:16.31 Server      Server process ID is 2748.
2007-04-04 16:34:16.31 Server      Authentication mode is MIXED.
2007-04-04 16:34:16.31 Server      Logging SQL Server messages in file 'S:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2007-04-04 16:34:16.31 Server      This instance of SQL Server last reported using a process ID of 4720 at 4/4/2007 4:32:23 PM (local) 4/4/2007 8:32:23 PM (UTC). This is an informational message only; no user action is required.
2007-04-04 16:34:16.31 Server      Registry startup parameters:
2007-04-04 16:34:16.31 Server        -d S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2007-04-04 16:34:16.31 Server        -e S:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2007-04-04 16:34:16.31 Server        -l S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2007-04-04 16:34:16.31 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2007-04-04 16:34:16.31 Server      Detected 1 CPUs. This is an informational message; no user action is required.
2007-04-04 16:34:16.42 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2007-04-04 16:34:16.45 Server      Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-04-04 16:34:18.01 Server      Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-04-04 16:34:18.01 Server      Database mirroring has been enabled on this instance of SQL Server.
2007-04-04 16:34:18.03 spid5s      Starting up database 'master'.
2007-04-04 16:34:18.03 spid5s      Error: 17207, Severity: 16, State: 1.
2007-04-04 16:34:18.03 spid5s      FCB:pen: Operating system error 5(Access is denied.) occurred while creating or opening file 'S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf'. Diagnose and correct the operating system error, and retry the operation.
2007-04-04 16:34:18.03 spid5s      Error: 17204, Severity: 16, State: 1.
2007-04-04 16:34:18.03 spid5s      FCB:pen failed: Could not open file S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf for file number 1.  OS error: 5(Access is denied.).
2007-04-04 16:34:18.03 spid5s      Error: 5120, Severity: 16, State: 101.
2007-04-04 16:34:18.03 spid5s      Unable to open the physical file "S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf". Operating system error 5: "5(Access is denied.)".
2007-04-04 16:34:18.05 spid5s      Error: 17207, Severity: 16, State: 1.
2007-04-04 16:34:18.05 spid5s      FCB:pen: Operating system error 5(Access is denied.) occurred while creating or opening file 'S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2007-04-04 16:34:18.05 spid5s      Error: 17204, Severity: 16, State: 1.
2007-04-04 16:34:18.05 spid5s      FCB:pen failed: Could not open file S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf for file number 2.  OS error: 5(Access is denied.).
2007-04-04 16:34:18.05 spid5s      Error: 5120, Severity: 16, State: 101.
2007-04-04 16:34:18.05 spid5s      Unable to open the physical file "S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf". Operating system error 5: "5(Access is denied.)".

Post #356068
Posted Wednesday, April 4, 2007 3:09 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 1:23 PM
Points: 23,398, Visits: 32,252

Sounds like a permissions issue on the file or directory.  Is the S drive local or on a san?

 




Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #356077
Posted Wednesday, April 4, 2007 3:15 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, August 4, 2013 11:06 AM
Points: 397, Visits: 548
yes its on SAN. howcome all of a sudden permissions are corrupted.
Post #356083
Posted Wednesday, April 4, 2007 4:40 PM
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: Thursday, September 4, 2014 3:47 PM
Points: 3,244, Visits: 538
Where does it say anything about PERMISSIONS??? It says ACCESS IS DENIED. Totally different.

Causes:
1. the SAN is not available.
This can happen on a reboot where the server comes up and the SAN is not attached yet. You need to put the SAN as a dependancy for MSSQLServer service.

2. The .mdf file is READ-ONLY.
Right click on the file, select Properties. Is READ-ONLY checked?

3. The .mdf is in use.
Do you have Antivirus on the server? Does it run upon restart? If it is scanning the .mdf or .ldf files, then they are in use and cannot be attached. Set the Antivirus to ignore extensions .mdf, .ndf, and .ldf.

-SQLBill



Post #356097
Posted Wednesday, April 4, 2007 4:41 PM
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: Thursday, September 4, 2014 3:47 PM
Points: 3,244, Visits: 538
BTW- this is one reason it's not always a good idea to put the system databases on a SAN.

-SQLBill



Post #356099
Posted Thursday, April 5, 2007 3:23 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:46 AM
Points: 2,879, Visits: 3,229

Is this the first time you have tried to start SQL after moving the system databases or changing the service account?  Can you log on using the service account and open the database files in Notepad?  Have your Infrastructure people applied a GPO that could change folder permissions?

As SQLBill says, the problem could be the files are not accessible.  If they are, then you need to look at permissions.



Original author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2014, 2012, 2008 R2, 2008 and 2005. 28 July 2014: now over 30,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Concept: "Pizza Apartheid" - the discrimination that separates those who earn enough in one day to buy a pizza if they want one, from those who can not.
Post #356182
Posted Friday, October 28, 2011 9:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 27, 2012 3:30 PM
Points: 4, Visits: 16
hay every one please try this,I wish it works ....

Search ERRORLOG right click check if its in read only mode.unchek it.
sql services will start.
Post #1197546
Posted Monday, April 22, 2013 12:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, May 8, 2013 6:53 AM
Points: 1, Visits: 8
Your SQL Server Service account needs to have full control permissions on the following directory:

c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\



Provide full control to the service account on the drive which contains DATA files which worked for me .
Let me know if you found any further issues .
Post #1444868
Posted Monday, April 22, 2013 12:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:56 PM
Points: 6,365, Visits: 13,695
This thread is nearly 2 years old!!

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

"Ya can't make an omelette without breaking just a few eggs"
Post #1444871
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse