First, try to recreate the LocalDB instance first if you are using LocalDB.
sqllocaldb stop MSSQLLocalDB
sqllocaldb delete MSSQLLocalDB
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
If still getting the same error, check the error log for the SQL Server which located at below.
%LocalAppData%\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb
Inspect the last few lines of the error, you might get the error below.
2025-06-08 21:37:49.09 spid10s There have been 256 misaligned log IOs which required falling back to synchronous IO. The current IO is on file C:\Users\xxxx\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\mssqllocaldb\master.mdf.
If that is the error you have, you might need to add ForcedPhysicalSectorSizeInBytes to your Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device registry. Please head to Troubleshoot errors related to system disk sector size greater than 4 KB for Microsoft official resolution. Reference:
https://learn.microsoft.com/en-us/answers/questions/1573054/creation-and-start-of-localdb-failure
No comments:
Post a Comment