添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

SQL Server 2014 SP3 CU4 service terminates suddenly with the errors id 17310 and 17311. The dump errors file show following stack:

Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\LOG\SQLDump0067.txt
SqlDumpExceptionHandler: Process 57 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
BEGIN STACK DUMP:
   01/25/21 19:09:36 spid 57
   Exception Address = 00000000D4AF1840 Module(UNKNOWN+0000000000000000)
   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
   Access Violation occurred writing address 00000000D4AF1840
 Input Buffer 510 bytes -
             INSERT INTO IntestazioneDoc (Id,TipoDoc,NumDoc,Agente,CodCli,
  DataDoc,DataEvasione,Acconto,Note,Sc1,Sc2,Sc3,DocAgg,Stato,DetailsCount,
  Anagrafe_Id,CreatedAt,UpdatedAt,Deleted) SELECT Id,TipoDoc,NumDoc,Agente
  ,CodCli,DataDoc,DataEvasione,Acconto,Note,Sc1,Sc2,Sc3,DocAgg,Stato,Detai
  lsCount,Anagrafe_Id,CreatedAt,UpdatedAt,Deleted FROM OPENDATASOURCE('SQL
  NCLI', 'Server=***').myDb.dbo.IntestazioneDoc WHERE CreatedAt > '25/01/2021 11:39:37 +00:00'

Also, here there is another error:

2021-02-28 22:50:26.86 spid58      Errore: 17311, gravità: 16, stato: 1.
2021-02-28 22:50:26.86 spid58      SQL Server is terminating because of fatal exception 80000003. This error may be caused by an unhandled Win32 or C++ exception, or by an access violation encountered during exception handling. Check the SQL error log for any related stack dumps or messages. This exception forces SQL Server to shutdown. To recover from this error, restart the server (unless SQLAgent is configured to auto restart).
2021-02-28 22:50:26.89 spid58      **Dump thread - spid = 0, EC = 0x0000000038AD0D90
2021-02-28 22:50:26.91 spid58      ***Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\LOG\SQLDump0094.txt
2021-02-28 22:50:26.91 spid58      * *******************************************************************************
2021-02-28 22:50:26.91 spid58      *
2021-02-28 22:50:26.91 spid58      * BEGIN STACK DUMP:
2021-02-28 22:50:26.91 spid58      *   02/28/21 22:50:26 spid 58
2021-02-28 22:50:26.91 spid58      *
2021-02-28 22:50:26.91 spid58      * ex_handle_except encountered exception 80000003 - Server terminating
2021-02-28 22:50:26.91 spid58      *
2021-02-28 22:50:26.91 spid58      * Input Buffer 510 bytes -
2021-02-28 22:50:26.91 spid58      *             INSERT INTO Anagrafe (Id,CodCli,Descrizione,PartitaIva,Indiri
2021-02-28 22:50:26.91 spid58      *  zzo,CAP,Localita,Prov,CodAli,Listino,Sconti,Note,Fido,FidoMax,Esposizion
2021-02-28 22:50:26.91 spid58      *  eMax,Esposizione,MaxOrdinabile,CreatedAt,UpdatedAt,Deleted,Aliquote_Id,B
2021-02-28 22:50:26.91 spid58      *  loccato,Nuovo,Soggetto,Nome,Cognome,Sesso,Telefono,Cellulare,CodiceFisca
2021-02-28 22:50:26.91 spid58      *  le,CodiceDestinatario,Privacy,CondizioniVendita) SELECT Id,CodCli,Descri
2021-02-28 22:50:26.91 spid58      *  zione,PartitaIva,Indirizzo,CAP,Localita,Prov,CodAli,Listino,Sconti,Note,
2021-02-28 22:50:26.91 spid58      *  Fido,FidoMax,EsposizioneMax,Esposizione,MaxOrdinabile,CreatedAt,UpdatedA
2021-02-28 22:50:26.91 spid58      *  t,Deleted,Aliquote_Id,Bloccato,Nuovo,Soggetto,Nome,Cognome,Sesso,Telefon
2021-02-28 22:50:26.91 spid58      *  o,Cellulare,CodiceFiscale,CodiceDestinatario,Privacy,CondizioniVendita F
2021-02-28 22:50:26.91 spid58      *  ROM OPENDATASOURCE('SQLNCLI', 'Server=***').myDb.dbo.An
2021-02-28 22:50:26.91 spid58      *  agrafe WHERE CreatedAt > '25/02/2021 15:18:33 +00:00'

Is there something that I should do in my program to fix this issues?

I would run task manager on SQL Server machine while running and check memory usage. See :support.microsoft.com/en-us/topic/… and social.technet.microsoft.com/Forums/azure/en-US/… – jdweng Mar 2, 2021 at 11:54 The server uses about 30% of total memory, so I think isn't a memory issue. But maybe the issue is caused by linked servers (the query links to Azure using OpenDataSource statement). But I don't know why. – Innova Mar 2, 2021 at 12:12

After much research and testing, I found that the problem was caused by 2 asynchronous processes running the above query at the same time. Since there was a trigger in the tables on which the query was executed, its execution raised the exception which then stopped the SQLServer service. I solved it by serializing the query execution.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.