Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Operating system error 5(Access is denied.) to master.mdf''


Operating system error 5(Access is denied.) to master.mdf''

Author
Message
sqlstar2011
sqlstar2011
Old Hand
Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)

Group: General Forum Members
Points: 399 Visits: 592

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.)".


Lynn Pettis
Lynn Pettis
SSC-Insane
SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)SSC-Insane (24K reputation)

Group: General Forum Members
Points: 24217 Visits: 37978

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



Cool
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)
sqlstar2011
sqlstar2011
Old Hand
Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)

Group: General Forum Members
Points: 399 Visits: 592
yes its on SAN. howcome all of a sudden permissions are corrupted.
SQLBill
SQLBill
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3453 Visits: 1017
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



SQLBill
SQLBill
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3453 Visits: 1017
BTW- this is one reason it's not always a good idea to put the system databases on a SAN.

-SQLBill



EdVassie
EdVassie
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3150 Visits: 3819

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 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005. 1 Dec 2016: now over 39,000 downloads.
Disclaimer: All information provided is a personal opinion that may not match reality.
Quote: "When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist." - Archbishop Hélder Câmara
perl1
perl1
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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.
preetish1234
preetish1234
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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 .
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8784 Visits: 16558
This thread is nearly 2 years old!!

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

"Ya can't make an omelette without breaking just a few eggs" ;-)
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