Professional Documents
Culture Documents
PROFILER
Suren
SQL SERVER PROFILER
SQL profiler is a GUI tool in Microsoft SQL Server relational database management
system that allows us to monitor, analyze, troubleshoot, re-create, and trace the problems
of SQL databases and their environments. It was first introduced in the SQL Server 2000
version. It traces activities or operations on a particular database engine
• Developers and Database Administrators can use the profiler to create and handle
traces, as well as replay and analyze trace results. It's like a dashboard that displays the
health of a Microsoft SQL Server instance. The profiler saves the events in a trace file that can be
analyzed or used later to replay a specific series of steps when diagnosing an issue. We can also
schedule the traces to run at specific times, such as one trace would be set up to run
every morning at 9 a.m. for comparing the performance when the database is active
or idle. We can also set another trace to run at 1 a.m. when the database activity is
little or no activity.
© Copyright MSC Mediterranean Shipping Company SA 2
Sensitivity: Internal
SQL SERVER PROFILER ALLOWS DEVELOPERS TO DO
THE FOLLOWING TASKS
• Create a trace
• See the results as the trace runs.
• Store the trace results in a table
• Start, stop, pause, and edit the trace results as needed
• Replay the trace results
How does profiler work in SQL Server?
Profiler is a standalone software tool that is installed on the system with SQL Server installation
setup. It operates by providing DBAs with a high-level perspective of a system's operation. DBA
creates traces to record data, monitor faults and other issues and then uses a profiler to save,
retrieve, and graphically view the results for troubleshooting and repair purposes. This function
entirely happens on the client-side, which means it uses resources on the same machine that it
is monitoring.
© Copyright MSC Mediterranean Shipping Company SA 3
Sensitivity: Internal
ADVANTAGES OF PROFILER
• The following are the most important benefits of profiler to both developers and DBAs:
• It is used for setting the trace database engine. By default, the General tab is selected
where we need to enter the trace name. The trace provider name and server name are
predefined and cannot be editable. After providing the name, we select whether we
want to save the trace results into a table or external file
• he event is an action or operation performed on the database engine. An event tab is
used for adding or removing the selected event for monitoring. The profiler tool can trace
all events, and each event is categorized on a specific event class. Some examples are
Batch Completed, Batch Starting, Audit Login, Audit Logout, Lock: Acquired, Lock:
Released, etc.