Solved

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

Posted on 2014-12-09
8
493 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:rmvgray
[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 50

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 50

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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:rmvgray
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 50

Accepted Solution

by:
Vitor Montalvão earned 500 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:rmvgray
ID: 40494408
ok update time
it worked great... until next reboot & then back to square one....same message access denied
0
 
LVL 50

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Viewers will learn how the fundamental information of how to create a table.

738 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