Troubleshooting for SQL Server 4014 error message


Some times you may observe 4014 error messages in SQL Server errorlog, like below
Error: 4014, Severity:20, State: 11.
A fatal error occurred while reading the input stream from the network. The session will be terminated

 

To continue analyze it, we should firstly know which is the issue client servers, and we can schedule to run below script during the issue most frequent time:

;WITH RingBufferConnectivity as
( SELECT
records.record.value(‘(/Record/@id)[1]’, ‘int’) AS [RecordID],
records.record.value(‘(/Record/ConnectivityTraceRecord/RecordType)[1]’, ‘varchar(max)’) AS [RecordType],
records.record.value(‘(/Record/ConnectivityTraceRecord/RecordTime)[1]’, ‘datetime’) AS [RecordTime],
records.record.value(‘(/Record/ConnectivityTraceRecord/SniConsumerError)[1]’, ‘int’) AS [Error],
records.record.value(‘(/Record/ConnectivityTraceRecord/State)[1]’, ‘int’) AS [State],
records.record.value(‘(/Record/ConnectivityTraceRecord/Spid)[1]’, ‘int’) AS [Spid],
records.record.value(‘(/Record/ConnectivityTraceRecord/RemoteHost)[1]’, ‘varchar(max)’) AS [RemoteHost],
records.record.value(‘(/Record/ConnectivityTraceRecord/RemotePort)[1]’, ‘varchar(max)’) AS [RemotePort],
records.record.value(‘(/Record/ConnectivityTraceRecord/LocalHost)[1]’, ‘varchar(max)’) AS [LocalHost]
FROM
( SELECT CAST(record as xml) AS