You are on page 1of 9

AN OVERVIEW OF THE SQL SERVER

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:

• Clarity: It shows how an instance interacts with a client.


• Troubleshoot Issues: It allows us to save and replay key events, which can help us in identifying
trouble areas. It is also useful for stress testing and finding queries that take a long time to execute.
• Allow non-administrator to create traces securely.
• It also saves traces for SQL, SSIS, and Analysis Services.
• Compare activity to baselines: It allows users to save trace data and compare it to fresh data in order
to identify new problems.
How to use PROFILER?
When we open the profiler, it will ask for authentication. Here we need to fill in the detail like server
type (whether you want to connect to Analysis Service Instance or Database Engine), server name,
authentication type, and credentials as shown in the below image:
© Copyright MSC Mediterranean Shipping Company SA 4
Sensitivity: Internal
When we open the profiler, it will ask for authentication. Here we need to fill
in the detail like server type (whether you want to connect to Analysis Service
Instance or Database Engine), server name, authentication type, and
credentials as shown in the below image:

© Copyright MSC Mediterranean Shipping Company SA 5


Sensitivity: Internal
GENERAL TABS AND EVENT TABS

• 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.

© Copyright MSC Mediterranean Shipping Company SA 6


Sensitivity: Internal
• Section 1 is the preview of the selected trace that
shows events and columns. It also allows us to select
the appropriate check box based on our needs. Section
2 shows the details of the Selected Events and Events
class. If we tick the section 3 check box, we will obtain
the entire list of Events and Columns in Section
1. Section 4 is like customization that has an option
column filters and organizes columns.
• When we click the "Column Filter button," it allows us
to filter more data to be saved by using conditions
such as like or not like. When you've finished filtering,
click OK to exit the edit filter window and preserve
your changes. Here is the image:

© Copyright MSC Mediterranean Shipping Company SA 7


Sensitivity: Internal
© Copyright MSC Mediterranean Shipping Company SA 8
Sensitivity: Internal

You might also like