SQL Errors

SQL - Error 1067 - SQL Service will not start

Overview

This error is caused by some of the more recent SSD and NVME or Harddisk drive that support a sector size greater than 4 KB

Problem:

  • When doing a Fresh install of SQL 2016-2019, you might encounter an error code 1067, which highlights that the SQL Engine Services cannot be started

  • The main issue for this error is due to an installed SSD/M2 or Harddrive that does not support 512 byte or 4 KB byte sector sizes

  • The SQL Errorlog would highlight something as follows: 

  • 2021-11-05 23:42:47.14 spid9s There have been 256 misaligned log IOs which required falling back to synchronous IO. The current IO is on file C:\\Program Files\\Microsoft SQL Server\\MSSQL15.MSSQLSERVER\\MSSQL\\DATA\\master.mdf. 


Solution:

Microsoft's recommendation is to force the OS to run in 4 KB sectors 

The following code can be used to see what the disk sector size is set too 

Run CMD in Admin mode 

fsutil fsinfo sectorinfo <Drive Letter> .ie C:

Look for the following PhysicalBytesPerSectorForAtomicity if the number is Greater that 4096 then SQL will not start.

Microsoft recommends that you run the following reg edit to force 4 KB bytes sizes 

CMD as Admin

REG ADD "HKLM\\SYSTEM\\CurrentControlSet\\Services\\stornvme\\Parameters\\Device" /v "ForcedPhysicalSectorSizeInBytes" /t   REG_MULTI_SZ /d "* 4095" /f