Tuesday, October 13, 2009

Using SQL Profiler Trace without the SA server role



By default users who has the SA role (SysAdmin) server role on the SQL server are able to trace activity on the SQL server with SQL Profiler. However not all users who need to trace SQL server activity will have the SA server role. To give users permissions to run SQL Profiler traces without the SA role, you need to grant ALTER TRACE permissions to the these users.

For instance grant SQL Profiler permissions to the user account Mark from domain MyCompany:

GRANT ALTER TRACE to [MyCompany\Mark]

For more information see: Permissions required to run SQL Profiler trace.

3 comments:

Filipe said...

Really usefull!

PS: commenting 'cause who has a blog knows how important this kind of comment is.. :)

Luanne @ Sisters Craft Cafe said...

Is it possible to grant alter trace to a user for a specific database only?

André van de Graaf said...

Luanne,

No, this permission to trace is on server level.