Solved

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

Posted on 2014-12-09
8
472 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 49

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 49

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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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 49

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 49

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql query 5 43
T-SQL: Stored Procedure Syntax 3 30
Need quicker response from an Execption table 11 19
Need to trim my database size 9 18
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
I have a large data set and a SSIS package. How can I load this file in multi threading?
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

735 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