SQL Server 2019 crashed: how to detect the reason?

WinnieTP 21 Reputation points
2022-09-28T10:07:07.913+00:00

My SQL Server crashed these days with MessageBox on servers screen:

----------

VS Just-In_time debugger:

"An unhandled Microsoft .Net Framework exception occurred in sqlservr.exe 12156"

----------

I could not find any explanations about this problem. Also, restart the service did not help.
I have installed all updates for Windows Server, all CU for SQL Server 2019 , restarted the Windows Server and again the same error

What can be the reason? what should I check?

SQL Server | Other
{count} votes

Accepted answer
  1. PandaPan-MSFT 1,931 Reputation points
    2022-09-30T01:37:26.577+00:00

    Hi @WinnieTP ,
    How about focus on the error information that

    VS Just-In_time debugger:

    VS is also an important part of SQL
    Try deleting the debug file in the registery. The location is :【HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger 】
    246253-image.png

    Another location:【HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\DbgManagedDebugger 】
    246274-image.png

    The same as :HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/Windows NT/CurrentVersion/AeDebug/Debugger

    HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Microsoft/.NETFramework/DbgManagedDebugger

    At last step reinstall the VS and restart your computer.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment"

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Olaf Helper 47,441 Reputation points
    2022-09-28T10:56:37.267+00:00

    Does really the SQL Server database engine or SSMS = Management tool crash?
    If database engine crashs, there should be dump file in log folder.

    0 comments No comments

  2. WinnieTP 21 Reputation points
    2022-09-28T11:43:29.223+00:00

    Yes, it is SQL Server 2019. The SSMS is not a problem, I have it on other machine etc.
    But the server with databases is crashed.
    Btw, I have 3 SQLCLR assemblies in database on this SQL Server.


  3. PandaPan-MSFT 1,931 Reputation points
    2022-09-29T02:39:42.213+00:00

    Hi @WinnieTP
    Is it possible that the antivirus software delete your net framework by mistake? How about trying reinstalling the net framework from this website: https://dotnet.microsoft.com/en-us/download/dotnet-framework. Install and restart your computer. If it is possible you may shut down your antivirus software for a while.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment"


  4. Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
    2022-09-29T21:18:10.417+00:00

    Often when SQL Server crashes, it is due to a bug in the product. However, before you open a support case, there are a few things you should check, and to cut it short, you have already mention one of these: unsafe CLR assemblies. Well, you did not say that they are unsafe, but I assume they are. And a incorrectly written unsafe assembly can indeed bring SQL Server on its knees.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.