SQL Server Profiler is an interface for creating and managing traces and analyzing and replaying trace results. These events are saved in a trace file that can be analyzed or used to replay a series of specific steps when a problem is diagnosed later.
The SQL Server Profiler tool can capture a lot of information about the database, such as connection status, adding, deleting, modifying, and changing statements, executed stored procedure parameters, and so on. If we create a new trace directly, after clicking Run, a large number of logs will be recorded, which is inconvenient for us to troubleshoot the problem.
What if we quickly find the SQL information we need?
In the template in the new track, select the following events:
Check to show all columns, slide the scroll bar, and check "DatabaseName", as shown in the figure below:
Click on the column filter to find databaseName, similar to population, we need to track the name of the database we want to analyze, as shown in the following image:
Of course, you can also filter by ApplicationName:
Finally, click Run.
Try executing a query SQL statement on the database, and the trace result is as follows:
(End)
|