Sessions Event Category

The Sessions event classes can be used to monitor Microsoft® SQL Server™ user connections.

Event class Description
Connect New connection event has occurred since the trace was started, such as a client requesting a connection to a server running SQL Server.
Disconnect New disconnect event has occurred since the trace was started, such as a client issuing a disconnect command.
ExistingConnection Activity by users connected to SQL Server before the trace was started has been detected. Otherwise, these existing connections would not be detected by the Connect event class.

Using the Disconnect and ExistingConnection event classes, it is possible to monitor the length of time each user connection was connected to SQL Server, and the amount of SQL Server processor time the queries submitted on the connection took to execute. This information can be useful for determining:

These are the event-specific data columns for the Sessions event category.

Event class Data column Description
Connect Binary Data Session level settings, including ANSI nulls, ANSI padding, cursor close on commit, null concatenation, and quoted identifiers. For more information, see SET.
Disconnect CPU CPU time used by the connection.
  Duration Duration of the connection (time elapsed since the connection was opened).
ExistingConnection Binary Data Session level settings, including ANSI nulls, ANSI padding, cursor close on commit, null concatenation, and quoted identifiers. For more information, see SET.
  CPU CPU time used by the connection until the time of the event.
  Duration Duration of the connection until the time of the event.

By monitoring the SQL User Name and NT User Name default data columns, you can map the name of the user to each connection.

To determine failed logins, use the LoginFailed event class in the Misc. Event Category.

See Also

Events Monitored by SQL Server Profiler

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.