)*********/
-- Eg.
-- Use the trace account (performancetest) to track SQL Server events.
-- Create a trace Logon account (performancetest) and grant it the alter trace and view server state permissions.
Use master
Create login performancetest with Password = 'abc @ 1234 ';
Go
Grant alter trace to performancetest;
Grant view server state to performancetest;
Go
-- Create a trace User Account (cetest) in the customer of the required database and grant it the showplan permission.
Use customer
Go
Create user performancetest from login performancetest;
Go
Grant showplan to performancetest;
Go
/*
Description (General ):
The permissions required for running profiler are the same as those required for executing the stored procedure of creating a trail.
Generally, to run profiler, you must have the alter trace permission.
/******************************/
PS note:
Users with the showplan, alter trace, or view server state permissions can view the query captured in the display plan output.
These queries may contain sensitive information, such as passwords.
Therefore
-- We recommend that you only grant the permission to view sensitive information, such as members of the db_owner fixed database role or members of the SysAdmin fixed server role;
In addition, it is recommended that you save the display plan file or trace file containing the display plan-related events to a location using the NTFS file system,
Only users with the right to view sensitive information are allowed to access the service.
*/