我们的一些 SQL 服务器上出现了一些零星的连接错误。我做了一些搜索,发现了 SQL 2008 R2 中的 Ring Buffer 并找到了一些信息,但我不完全确定如何弄清楚。
运行查询
SELECT CAST(record AS XML)
FROM sys.dm_os_ring_buffers
WHERE ring_buffer_type = 'RING_BUFFER_CONNECTIVITY'
给我一些结果,其中很有趣
<Record id="4" type="RING_BUFFER_CONNECTIVITY" time="461419385">
<ConnectivityTraceRecord>
<RecordType>LoginTimers</RecordType>
<Spid>0</Spid>
<SniConnectionId>40A403B2-B860-4877-A1D3-1FA7024356B7</SniConnectionId>
<SniConsumerError>17830</SniConsumerError>
<SniProvider>4</SniProvider>
<State>11</State>
<RemoteHost><local machine></RemoteHost>
<RemotePort>0</RemotePort>
<LocalHost />
<LocalPort>0</LocalPort>
<RecordTime>5/19/2012 16:29:23.831</RecordTime>
<TdsBuffersInformation>
<TdsInputBufferError>109</TdsInputBufferError>
<TdsOutputBufferError>0</TdsOutputBufferError>
<TdsInputBufferBytes>0</TdsInputBufferBytes>
</TdsBuffersInformation>
<LoginTimers>
<TotalLoginTimeInMilliseconds>18010</TotalLoginTimeInMilliseconds>
<LoginTaskEnqueuedInMilliseconds>0</LoginTaskEnqueuedInMilliseconds>
<NetworkWritesInMilliseconds>0</NetworkWritesInMilliseconds>
<NetworkReadsInMilliseconds>18010</NetworkReadsInMilliseconds>
<SslProcessingInMilliseconds>0</SslProcessingInMilliseconds>
<SspiProcessingInMilliseconds>0</SspiProcessingInMilliseconds>
<LoginTriggerAndResourceGovernorProcessingInMilliseconds>0</LoginTriggerAndResourceGovernorProcessingInMilliseconds>
</LoginTimers>
</ConnectivityTraceRecord>
<Stack>...</Stack>
</Record>
所以,我的问题是,我在哪里可以找到 TDS 错误编号的含义。在这种情况下<TdsInputBufferError>109</TdsInputBufferError>
我不确定这是一个详尽的列表,但错误 109 和错误 10054(来自这个类似的问题)在数据库引擎错误(旧链接:SQL 通信错误)一文中有详细说明。