1. Home
  2. Troubleshooting
  3. Monitoring Issues
  4. Queries Module
  5. Priority screen name on queries is missing

Priority screen name on queries is missing

For Priority systems based on SQL Server, AimBetter brings the query’s Priority screen name using SQL Server’s Extended Event. 

If the Priority screen is not displayed on AimBetter, the first step is to check the Priority module created by AimBetter in the Extended Events by running the following script on the SQL Server Management Studio:

SELECT * FROM sys.dm_xe_sessions

More than one Priority environment 

If the module AimSQLPriv2 doesn’t exist, the reason may be that more than one Priority environment exists in the same SQL Server instance.

AimBetter only works if there is a single Priority environment per instance, referring to the database that includes “system” in its name (445_system, for example).

If AimBetter finds two DBs with “system” in their names, it doesn’t know which one to fetch the data from.

Lack of permission

If there is only one priority environment in the instance, there may be a permissions issue. 

The user may have been created with minimum permissions, as explained here

In this case, we have to grant the AimBetter user permission to retrieve data from additional tables by running the following script.

use [system]
GO
GRANT SELECT ON [dbo].[PROCESSLIST] TO [AimBetter]
GO
GRANT SELECT ON [dbo].[USERS] TO [AimBetter]
GO
GRANT SELECT ON [dbo].[T$EXEC] TO [AimBetter]
GO

Notice: If the problem is related to permissions, in the Observer tab, we should see Permission violation events related to the user who runs the AimBetter Agent.

Was this article helpful?