
So to test Alter Trace permissionH, here is the SQL code that you can execute to test if database user has the required authorization. If the login is not a member of sysdamin fixed server role, a member of the sysadmin fixed role can grant the trace permission to an other login user by. In order to execute a SQL trace on SQL Server, the database user should be either have sysadmin role or Alter Trace permission. If the SQL login name or the User name is a member of sysadmin fixed server role, than the related user will have the required trace permission to execute a profiler trace on the SQL Server. So if you have a SQL login or a Windows user authorized on a SQL Server instance, by using Has_Perms_By_Name function, you can check if you have the required permission to run or execute a SQL trace using SQL Server Profiler tool. However, the file created with sptracecreate seems to be owned by the SQL Service and I do not have administrative permission to grant myself read-access. I am able to generate the trace, set filters, and even stop and delete the trace through sql server without an issue. SQL Server database professionals can use HAS_PERMS_BY_NAME() SQL security function to check if any specific database permission is granted to a user or role on any database or on a specific database, etc. I am trying to set up a trace on a remote server.
SQL SERVER 2012 PROFILER PERMISSIONS HOW TO
How to Check if you have SQL Profiler Permission For most cases this works however, if the wrong login is associated with a user, a user may have incorrect permissions.

SQL SERVER 2012 PROFILER PERMISSIONS UPDATE
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. The spchangeuserslogin stored procedure can also perform an update of all orphaned users with the 'autofix' parameter but this is not recommended because SQL Server attempts to match logins and users by name. Note: these system tables are a deprecated feature in SQL Server 2012 and are being replaced by Extended Events.


The error message displayed by SQL Server Profiler showed me that I require Alter Trace permission or be a member of sysadmin fixed server role. This is no big deal when you’re reviewing a profiler trace of a SQL Server engine because there are system tables available to look up the descriptive values that correspond to the codes. Recently I tried to execute a SQL trace using SQL Server Profiler tool on a database to see which SQL procedures are executed by a web application page and with which SQL procedure parameters.īut I realized that I did not have required permissions to run SQL Server Profiler trace on that remote SQL Server instance. Required Permissions to Execute SQL Profiler Trace
