I am a self-taught developer with knowledge of Azure, C, C++, C#, Typescript/JavaScript, HTML and CSS along with several databases. Having been working in IT for over 30 years and co-founding and selling a successful company I am now working on products for the TV industry.Follow me on twitter @coderanger, Mastodon @coderanger/@dotnet.social and GitHub

SQL Server Failed to Start on Reboot

I got an error the other night which frightened the life out of me after I restarted my SQL Server 2014 machine because of a Windows Update.

Basically it would not restart and the event viewer gave some obscure error message which didn’t help. After finding and looking in the sql server log I saw the following messages:

2015-02-28 00:39:11.63 spid8s Starting up database ‘master’.

2015-02-28 00:39:11.84 spid8s Attempting to allocate 6560086 BUF for buffer pool extension for a maximum of 6560085 page descriptors.

2015-02-28 00:39:11.84 spid8s Error: 864, Severity: 16, State: 1.

2015-02-28 00:39:11.84 spid8s Attempting to allocate 6560086 BUF for buffer pool extension for a maximum of 6560085 page descriptors.

After a bit of searching I came across this excellent article.

Basically, because I only had SQL Server Standard I find out that Buffer Pool Extensions is limited to just 4 times the Maximum Server Memory option. I didn’t know this when it let me set any value I wanted – bad show Microsoft!!

One of the first rules of application development is to not allow bad values; worst still there are so many ways they could have improved this:

  • Not allow the invalid value in the first place
  • If an invalid value is entered, limit it to the maximum value allowed, or use a default value
  • Turn off the feature if the value is invalid
  • NEVER EVER just stop the product working without any useful error message as to why!!