?
Solved

SQL server keeps crashing with access denied on master.mdf & masterlog.ldf

Posted on 2014-12-09
8
Medium Priority
?
589 Views
Last Modified: 2016-01-14
I installed SQL 2012 Server on a brand new windows 2012 R2 VM. Everything seemed to go ok & have moved databases over from an old server, however after a reboot, the SQL server service fails to start with the error message
Log Name:      Application
Source:        MSSQLSERVER
Date:          09/12/2014 13:28:36
Event ID:      17204
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      PPPSQL.philippank.com
Description:
FCB::Open failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf for file number 2.  OS error: 5(Access is denied.).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MSSQLSERVER" />
    <EventID Qualifiers="49152">17204</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-12-09T13:28:36.000000000Z" />
    <EventRecordID>64286</EventRecordID>
    <Channel>Application</Channel>
    <Computer>PPPSQL.philippank.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>FCB::Open failed</Data>
    <Data>C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mastlog.ldf</Data>
    <Data>2</Data>
    <Data>5(Access is denied.)</Data>
    <Binary>344300001000000007000000500050005000530051004C00000000000000</Binary>
  </EventData>
</Event>
and
Log Name:      Application
Source:        MSSQLSERVER
Date:          09/12/2014 13:28:36
Event ID:      17204
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      PPPSQL.philippank.com
Description:
FCB::Open failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf for file number 1.  OS error: 5(Access is denied.).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="MSSQLSERVER" />
    <EventID Qualifiers="49152">17204</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-12-09T13:28:36.000000000Z" />
    <EventRecordID>64285</EventRecordID>
    <Channel>Application</Channel>
    <Computer>PPPSQL.philippank.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>FCB::Open failed</Data>
    <Data>C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\master.mdf</Data>
    <Data>1</Data>
    <Data>5(Access is denied.)</Data>
    <Binary>344300001000000007000000500050005000530051004C00000000000000</Binary>
  </EventData>
</Event>

I've searched everywhere I can think of for an answer.
I am logged in as a domain administrator
SQL 2012 was installed by domain administrator
I've disabled VM hotadd/hotplug capability, rebboted & it worked,... next reboot, back to square one.
0
Comment
Question by:Richard Gray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40488897
Check if the SQL Server service account has permissions on C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40488900
do you mean that you moved master.mdf & masterlog.ldf from another server?
this is instance specific database  there is no need to move them, you only need to attach you own databases if you need to use existing one, or use sql backup and restore
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40488905
this is instance specific database  there is no need to move them, you only need to attach you own databases
Good point. I wasn't expect that he did that when he said he moved databases. Only user databases can be moved. System databases shouldn't (master, msdb and model).
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:Richard Gray
ID: 40488970
I didn't move those dbs, I've only copied our own dbs (defects & timesheets) to new server for testing before it goes into production.
Have added the SQL Server service account permissions on C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA & seems ok... will see how it goes for a while before closing question. BUT I have to ask why they were not added when SQL2012 was installed
0
 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 40488978
SQL Server doesn't has access to folder permissions so it can't add those permissions itself.
Need to be a Windows Administrator to do that. You can also add the SQL Server service account in the Local Admin Group so the account will have access to all server (not recommended).
0
 
LVL 12

Expert Comment

by:FarWest
ID: 40488991
I was wondering  because you said you have a new machine and "moved databases over"
and vitor trusted that you wouldn't do that more than I did :)

I'm  sure  vitor solution will work fine for you

happy time for all of you
0
 

Author Comment

by:Richard Gray
ID: 40494408
ok update time
it worked great... until next reboot & then back to square one....same message access denied
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40495631
The permissions still there after rebooting?
It's possible that there's some kind of policy that clean the folder permissions?
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following article is comprised of the pearls we have garnered deploying virtualization solutions since Virtual Server 2005 and subsequent 2008 RTM+ Hyper-V in standalone and clustered environments.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
Viewers will learn how the fundamental information of how to create a table.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question