none
SqlConnection.ClientConnectionId / sys.dm_exec_connections RRS feed

  • Question

  • I am trying to resolve my .NET SqlConnection::ClientConnectionId value to sys.dm_exec_connections in SQL but failing to find a matching record.  Does ClientConnectionId not represent a record in SQL Server sys.dm_exec_connections?

    Friday, July 3, 2015 1:02 AM

Answers

  • Hello scott_m,

    >> Does ClientConnectionId not represent a record in SQL Server sys.dm_exec_connections?

    No, as we can see the ClientConnectionId would be generated regardless of whether the attempt succeeded or failed. However, the record in sys.dm_exec_connections view only represents these established connections. If you want to check the ClientConnectionId information, you could check the extended event log:

    https://technet.microsoft.com/en-us/library/bb630354(v=sql.105).aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by scott_m Monday, July 6, 2015 3:17 AM
    Monday, July 6, 2015 2:08 AM
    Moderator