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
Solved

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

Posted on 2014-12-09
8
444 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 48

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 48

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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 48

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 48

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
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 …

792 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