Administering SQL Server

SQL Profiler Scenarios

Typically, you use SQL Profiler to:

You can audit activity in SQL Server using SQL Profiler. For example, if the security administrator always needs to know who is logged in to the server, you can create a SQL Profiler trace that provides a complete view of users who have logged in or out of the server. This information can then be used for legal purposes to document activity and for technical purposes to track security policy violations.

To set up a SQL Profiler trace that tracks users who have logged in or out of the server, do the following:

  1. Create a trace, selecting Audit Login Event.

  2. To return the appropriate information, specify the following data columns:

    EventClass (selected by default)

    EventSubClass

    LoginSID

    LoginName

See Also

Locks Event Category

Sessions Event Category

Stored Procedures Event Category

TSQL Event Category