Provide a SQL Login ALTER TRACE permission

379 views 04:26 2 Comments 5 January 2020

Provide a SQL Login ALTER TRACE permission

One SQL login holder asked DBA team “Please provide me profiler access urgently“. Mentioned user using a SQL login and he wants to run profiler on a particular database of a production server. A screenshot also shared by that user.

Error: 
In order to run a trace against SQL Server you must be a member of 
sysadmin fixed server role or have the ALTER TRACE permission.

Solution

As the user already has ‘SQL login’ and ‘DATABASE user’ we checked and assigned that user ‘db_owner’. Then provide ‘ALTER TRACE‘ permission to the use.

Using TSQL

-- For Windows Login
USE Master
go
GRANT ALTER TRACE TO [DOMAIN_NAME\WINDOWS_LOGIN]
go

-- For SQL Login
USE master
go
GRANT ALTER TRACE TO [SQL_LOGIN]
go

Using SSMS

2 thoughts on “Provide a SQL Login ALTER TRACE permission”

  • Hello! I could have sworn I’ve been to this website before but after checking through some of the post I realized it’s new to me.
    Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back
    frequently!

  • Hi, i believe that i saw you visited my web site thus i got here to go back the prefer?.I’m attempting to
    to find issues to enhance my website!I suppose its
    good enough to use a few of your ideas!!

Leave a Reply

Your email address will not be published. Required fields are marked *