SQL SERVER – Event ID:7034 – MSSQLSERVER Service Terminated Unexpectedly. It has Done this 6 time(s)

SQL Server Termination Button.Recently, I came across a strange issue. I noticed that the SQL Server service terminates and restarts automatically and sometimes doesn’t restart and I must manually start it again. In this blog we would learn about Event ID:7034, MSSQLSERVER Service Terminated Unexpectedly.

I referred a lot of online content and they were asking me to refer ERRORLOG. SQL SERVER – Where is ERRORLOG? Various Ways to Find ERRORLOG Location

There was no symptom of SQL Service getting stopped via an external program in ERRORLOG. Looks like it was simply crashing. I checked the System and Application Event log and found below.

Log Name: Application
Source: Windows Error Reporting
Date: 7/7/2018 1:21:53 PM
Event ID: 1001
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: Quick
Description:
Fault bucket 1181302166329499531, type 4
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: sqlservr.exe
P2: 2017.140.3029.16
P3: 5b21dccf
P4: ntdll.dll
P5: 10.0.17134.137
P6: f4df6dc2
P7: c0000005
P8: 00000000000068fc
P9:
P10:

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERACEB.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERBA78.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERBA99.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERBAA1.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERBAF0.tmp.txt
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_sqlservr.exe_c19c97a3e43677fd3c4956f6194529989c38_21ffaff5_6229c10f

There was no meaningful information in “C:\ProgramData\Microsoft\Windows\WER\ReportArchive\” folder but there were many folders with name AppCrash_sqlserver.exe. As per Quora, 0xC0000005 is a code for Access Violation error. It means that your program just tried to read or write, in a section of memory that it has no access to. Most likely, this happened due to poor usage of pointers.

WORKAROUND/SOLUTION

I had no clue why there was a crash of SQL Service. As per internet reading, the SQL server process might terminate unexpectedly for several reasons.

  • Incorrect program configuration
  • System memory problems
  • Improper license information
  • Missing program files
  • Corrupt user data
  • Severe disk fragmentation.

Once I performed a clean restart of the server, the error didn’t come back again. I am sure it was some rogue process running on the server which got cleared after restart or it might have been some memory corruption. If it comes back again, I think I should report to Microsoft. What do you think? Have you seen this error earlier?

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

SQL Error Messages, SQL Log, Starting SQL
Previous Post
SQL SERVER – Backup to URL – Script to Generate the Create Credential and Backup Command using Access Keys
Next Post
Scalability and Availability Challenges and Shareplex Solutions

Related Posts

7 Comments. Leave new

  • Even one of our server encountered same issue and there was nothing reported in the logs !! Very strange !!

    Reply
  • We have MDW enabled for this server; but they also haven’t captured anything except CPU spike (around 50%)

    Reply
  • One of our prod share point server went down with same event id. No clue in logs and eventviewr.

    Reply
  • Mustafa EL-Masry
    November 7, 2018 12:52 pm

    Hello Pinal Dave

    I faced this issue before and i could fixed it by Granting full access for SQL Server engine services account on Folder name MachineKeys in this path (C:ProgramDataMicrosoftCryptoRSA)

    Reply
    • Michal Robert Piatek
      November 3, 2020 4:15 pm

      Dear Mustafa,
      how did you find that it was access to this particuar folder being the culprit?
      I took you post as a hint and added the SQL Service account (an AD account) to the local admins and it seems to help. We have a case open with CSS and I am curious what they are going to say. I will keep this comment updated.
      thank you very much for the cool idea.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.