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.
-- To Grant access to a Windows Login
USE Master;
GO
GRANT ALTER TRACE TO [DomainNAME\WindowsLogin]
GO
-- To Grant access to a SQL Login
USE master;
GO
GRANT ALTER TRACE TO mysqlacct
GO
-- REVOKE access FROM a Windows Login
USE master;
GO
REVOKE ALTER TRACE FROM [DomainNAME\WindowsLogin]
GO
--REVOKE access FROM a SQL Login
USE Master;
GO
REVOKE ALTER TRACE FROM mysqlacct;
GO
Comments