VIEW SERVER STATE permission was denied error in the Confluence Logs

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The following error starts to appear in the Confluence logs after fresh installing Confluence 8.1.0 with SQL Server or updating the CCMA app to the latest version:

atlassian-confluence.log

1 2 ERROR [Caesium-1-4] [agent.newexport.store.JdbcConfluenceStore] fetchInteger Query failed at: Query(sql=SELECT CPU_COUNT FROM sys.dm_os_sys_info, tableName=null, exportName=null, userkeyColums=[], preserveIdentifierCase=false) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT CPU_COUNT FROM sys.dm_os_sys_info]; SQL state [S0001]; error code [300]; VIEW SERVER STATE permission was denied on object 'server', database 'master'.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: VIEW SERVER STATE permission was denied on object 'server', database 'master'.

Environment

  • Confluence 6.15.1 and above.

  • SQL Server versions 2016,2017, and 2019.

  • CCMA 3.4.1 and above.

Diagnosis

After updating the CCMA app to the latest version the error message will happen

Cause

This error message is caused by some changes to the CCMA plugin from version 3.4.1 onwards.

After version 3.4.0 the CCMA plugin will no longer run the scheduled CPU query and it will be based on system properties.

Solution

In order to solve this issue the user will need to set grant the necessary permissions to fix the error message above following the steps below:

  1. Stop Confluence

  2. Login to your database using your system administrator account.

  3. Execute the following queries (replace the [db_username] with your database user):

    1 2 3 USE MASTER GO GRANT VIEW SERVER STATE TO [db_username]
  4. Start Confluence.

Updated on March 21, 2025

Still need help?

The Atlassian Community is here for you.