Solved

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

Posted on 2014-12-09
8
368 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
  • 4
  • 2
  • 2
8 Comments
 
LVL 45

Expert Comment

by:Vitor Montalvão
Comment Utility
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
Comment Utility
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 45

Expert Comment

by:Vitor Montalvão
Comment Utility
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
 

Author Comment

by:rmvgray
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 45

Accepted Solution

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

Expert Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
OfficeMate Freezes on login or does not load after login credentials are input.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now