I just cant find a fix to this error.

I tried to fix this using different methods but none of it worked
https://learn.microsoft.com/en-us/answers/questions/2337222/unable-to-install-sql-server-exit-code-(decimal)-2
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/database-file-operations/troubleshoot-os-4kb-disk-sector-size?WT.mc_id=DP-MVP-5440&tabs=PowerShell#resolution-steps-for-disk-sector-size-errors-in-sql-server followed these two articles but still couldnt find an answer. please help kind of a urgent situationπŸ‘ User's image

0 comments No comments

Sign in to comment

Answer recommended by moderator

Erland Sommarskog 134.7K Reputation points β€’ MVP β€’ Volunteer Moderator

Reformatting and reinstalling on a new laptop? That's does not sound appealing. From where would you reinstall Windows? The same image as it was originally created from? Then maybe not (that is, I don't know). If you take a plain default image? More likely, but then you might be missing support stuff from the laptop vendor.

0 comments No comments

Sign in to comment

1 additional answer

  1. Erland Sommarskog 134.7K Reputation points β€’ MVP β€’ Volunteer Moderator

    The message Wait on the Database Engine recovery handle failed is a generic error that means that SQL Server did not start when Setup wanted to run configuration steps. To understand why it did not start, you need to look in the SQL Server errorlog, which you find in C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\LOG\ERRORLOG.

    If you see a message about 256 misaligned reads, you are running into a known issue where Windows 11 for some disk drives reports a sector size that SQL Server does not cope with. Microsoft has published an article with workarounds for the problem.

    If you don't see the message about misaligned reads, feel free to upload the errorlog here, so we can look at it. You will need to rename to ERRORLOG.txt for the forum software to accept it.

    1. Ometh Dasanayake 0 Reputation points

      the log folder you gave location to is empty.πŸ‘ User's image

      in this location there are a lot of txt files which i cant quite tell which is the error log. so i will upload the whole folder as a zip file.πŸ‘ User's image

      πŸ‘ User's image

      https://drive.google.com/file/d/1T4o8SzoRBV2ohEToslk6TI50sgna0s1c/view?usp=sharing

    2. Erland Sommarskog 134.7K Reputation points β€’ MVP β€’ Volunteer Moderator

      Thanks for uploading the files! They help to clarify your situation.

      Normally, when you get the error message about the startup handle, what happens is that SQL

      Server starts, creates the log file, and the fails during the startup phase.

      But in your case SQL Server does not start at all. This can be more difficult to troubleshoot.

      Before we move on, I like to know a little about your environment. I this a corporate computer, or your private laptop? In the latter case, what antivirus do you have? Windows Defender or something else?

      Open a command prompt with Run as Administrator. Run this:

      cd \Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER04\MSSQL\BINN
      sqlservr -s MSSQLSERVER04
      

      Please share a screenshot of this experiment.

      I like to add that the disk-sector issue that I mentioned in my original post is not in play here. If this would be the only problem, there would be an errorlog-file. However, I recommend that you review the article that i linked to and run the diagnostic command in that article and verify that no number is > 4096. If you see some values above this limit, apply the registry edits suggested in the article and reboot. This is not going to help with the problem you are facing now, but if we are able to resolve the issue you are facing now, this saves you from getting into more trouble.

    3. Ometh Dasanayake 0 Reputation points

      so this is my private laptop bought it a few days ago. and i dont have any other antivirus only windows defender.

      also i forgot to work with ssms i wanted to install sql server. so i installed ssms first and then moved to this. i dont think this matters but just wanted to state it.

      i didnt get any result from the command given above. it pauses for a moment and do nothing.πŸ‘ User's image

      and yes i followed the above given article and did the changes given accordingly
      πŸ‘ User's image

      πŸ‘ User's image

    4. Erland Sommarskog 134.7K Reputation points β€’ MVP β€’ Volunteer Moderator

      And this new laptop is an x64 machine and not an ARM?


    Sign in to comment
Sign in to answer

Your answer