SQL Server probe - database_size for all user related
search cancel

SQL Server probe - database_size for all user related

book

Article ID: 443493

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

After enabling the database size in the SQL probe we are getting only details of the system database not the user database

Environment

DX UIM 23.4.x

SQLServer probe any version

Resolution

To enable the database_size checkpoint to perform its queries, the customer must provide the probe login with access to each user database.

Recommended Approach (For all checkpoints):
For comprehensive monitoring, add the probe login to the db_datareader role within each user database:
USE [YourUserDatabase];
EXEC sp_addrolemember 'db_datareader', 'probe_login';

 

Minimum Requirement (database_size checkpoint Only):
Alternatively, grant only the necessary CONNECT and VIEW DATABASE STATE permissions:
USE [YourUserDatabase];
GRANT CONNECT TO [probe_login];
GRANT VIEW DATABASE STATE TO [probe_login];

These steps must be repeated for every user database requiring monitoring.

 

Important Note: Without these explicit permissions, the sp_MSforeachdb procedure used by the checkpoint will silently skip any database the login cannot access. This typically results in only system databases (master, model, msdb, and tempdb) being visible, as they allow access to all SQL logins by default.