ILM failed due to VIEW SERVER STATE permission denied - Automic Automation
search cancel

ILM failed due to VIEW SERVER STATE permission denied - Automic Automation

book

Article ID: 204079

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

When performing an Information Lifecycle Management (ILM) switch or rollover, the process fails. The Automation Engine (AE) logs or PWP logs show the following database error:

U00003592 UCUDB - Status: '42000' Native error: '300' Msg: 'VIEW SERVER PERFORMANCE STATE permission was denied on object 'server', database 'master'.'

Followed by: U00003592 UCUDB - Status: '42000' Native error: '297' Msg: 'The user does not have permission to perform this action.'

or

U00003592 UCUDB - Status: '42000' Native error: '300' Msg: 'VIEW SERVER STATE permission was denied on object 'server', database 'master'.'

Followed by: U00003592 UCUDB - Status: '42000' Native error: '297' Msg: 'The user does not have permission to perform this action.'

 

Note: 

While the ILM switch was unsuccessful, it's important to note that this may or may not be accompanied by ILM failure. If ILM has not failed, you should be able to reschedule the switch to take place after the permission issue has been resolved (below). If ILM has failed, fixing the permission below is step 1. Step 2 involves opening an issue with technical support and attach the following information:

  • A copy of the AE logs.
  • A copy of the query/output: SELECT * FROM ISTMT;

 

Environment

Release : 24.x, 26.x

Component : AUTOMATION ENGINE

Cause

The database user assigned to the Automation Engine (specified in the ODBC DSN) lacks the necessary permissions to access SQL Server Dynamic Management Views (DMVs) used to verify locks on ILM tables.

Resolution

Step 1: Verify Current User Permissions

Run either of the following scripts in SQL Server Management Studio (SSMS) to check if the database user/login has access to the required DMVs (sys.dm_tran_locks and sys.dm_exec_sessions).

  • Option A: Check Effective Permissions (Run while logged in as the DB User)

    Use this SQL if you are logged in directly as the AE Database User. Using sys.fn_my_permissions evaluates the permissions of the currently connected session. If you are connected using the exact SQL login configured for the Automation Engine, this gives you an immediate answer on whether that user has server-level state visibility.
    SELECT permission_name, state_desc 
    FROM sys.fn_my_permissions(NULL, 'SERVER') 
    WHERE permission_name IN ('VIEW SERVER STATE', 'VIEW SERVER PERFORMANCE STATE');
    
    • Pass condition: Returns a row with GRANT under state_desc.

    • Fail condition: Returns no rows.

  • Option B: Query Server Permissions for a Specific Login (Run as DBA / sysadmin)

    Use this SQL if you are a DBA logged in under your own Admin/sysadmin account. Then, you can inspect what permissions were granted to '<LOGIN_NAME>' (*which should be updated in the query below to reflect the DB account that the Automation Engine uses). 

    SELECT 
        sp.name AS login_name,
        perm.permission_name,
        perm.state_desc
    FROM sys.server_permissions perm
    JOIN sys.server_principals sp ON perm.grantee_principal_id = sp.principal_id
    WHERE sp.name = '<LOGIN_NAME>'
      AND perm.permission_name IN ('VIEW SERVER STATE', 'VIEW SERVER PERFORMANCE STATE');
    
  • Option C: Direct Functional Test

    Use this SQL as a quick test while logged in as the AE Database user. It skips checking metadata views entirely and attempts to read directly from from sys.dm_exec_sessions and sys.dm_tran_locks. If it works, you have access. 

    SELECT TOP 1 session_id FROM sys.dm_exec_sessions;
    SELECT TOP 1 resource_type FROM sys.dm_tran_locks;
    

    (If permissions are missing, this will typically fail with Native Error 300 / 297).

 

Step 2: Grant Required Permissions

Execute the grant command on the master database using a sysadmin account, choosing the appropriate statement based on your SQL Server version:

  • SQL Server 2022 and Later (or Azure SQL):

    SQL
    USE master;
    GO
    GRANT VIEW SERVER PERFORMANCE STATE TO [<LOGIN_NAME>];
    GO
    

    (Note: SQL Server 2022 introduced granular performance state permissions. VIEW SERVER STATE will also work as it inherits performance state access).

  • SQL Server 2019 and Earlier:

    SQL
    USE master;
    GO
    GRANT VIEW SERVER STATE TO [<LOGIN_NAME>];
    GO