When the CONNECTION_NAME Keyword Is Updated
GET DIAGNOSTICS updates the CONNECTION_NAME field when the following
situations occur:
- A CONNECT statement successfully executes.
- A SET CONNECTION statement successfully executes.
- A DISCONNECT statement successfully executes at the current connection.
GET DIAGNOSTICS fills the CONNECTION_NAME field with blanks because no current connection exists.
- A DISCONNECT ALL statement fails.