SansSQL: Profiler

Monday, June 3, 2013

Client Side and Server Side Tracing in SQL Server

What comes to your mind first when someone says or talks about the performance tuning?
Obviously, it will be Profiler and Tracing.
Profiler is a tool which is used to trace and store the events that are happening on a particular database or on a server overall. The result of this tool can be stored either as a file or in a table.
When you open the profiler and run the trace against a database it is referred to Client side tracing, this is because the profiler being a client tool and even when the profiler is run within the server, it is also referred as Client Side Tracing.

Sunday, December 4, 2011

Give access to a non sysadmin user to run Profiler

Sometimes as a DBA, you come across a situation where you need to give access to a non sysadmin user to run profiler on a particular SQL server.
If you try to run the profiler using the user who does not have sysadmin access then you will get the below error.

Here is the solution how to grant access to a non sysadmin user to run profiler.
Using Query: 
-- To Grant access to a Windows Login
USE master;
GRANT ALTER TRACE TO [Domain\WindowsLogin]

-- To Grant access to a SQL Login
USE master;
GRANT ALTER TRACE TO [SQL User]

Using SSMS:

  1. Expand the Server in object Explorer
  2. Expand "Security" folder and then "logins"
  3. Right-Click on the login to which you need to give access and then go to "Properties" of that login
  4. Go to "Securables" Tab
  5. Select the server you want to add the permission
  6. In the "Permission for <Server Name>" block, click on "Grant" check box for "Alter Trace" and click "OK"
  7. Once this is completed, the permission should appear in the "Effective" Tab

Note: The Granter should be a sysadmin user.  

Ads