SQL Server 2019 crashed: how to detect the reason?

WinnieTP 21 Reputation points

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
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,895 questions
{count} votes

Accepted answer
  1. PandaPan-MSFT 1,901 Reputation points

    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 】

    Another location:【HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\DbgManagedDebugger 】

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


    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 41,411 Reputation points

    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

    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,901 Reputation points

    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 102.3K Reputation points

    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