This section provides information about the prerequisites for monitoring SQL Server instances.
Monitoring mirroring operations necessitates sysadmin privileges.
A Foglight user needs to be created on every database within the instance, otherwise, it cannot be monitored. New databases created after the Foglight agent installation need to be added either by running the permission script again or manually using CREATE USER <Foglight User> under the new database.
Following are the permissions required to monitor SQL server:
Instance Level | |
---|---|
VIEW ANY DEFINITION VIEW SERVER STATE ALTER TRACE |
Granted for: Tracing a Session Deadlocks monitoring PI Change-Tracking |
Database Level | |
---|---|
Map Foglight Login to a database user If a domain group with the appropriate permissions is used, there is no need to create a new user. |
|
db_ddladmin | Granted for: Running DBCC commands for indexes |
CREATE USER
It is a permission for Amazon RDS for SQL Server. |
Grant Execute on these master database objects:
xp_enumerrorlogs xp_readerrorlog |
Granted for Error log monitoring |
Grant Select on these msdb database objects:
log_shipping_monitor_primary log_shipping_monitor_secondary log_shipping_primaries log_shipping_secondaries log_shipping_primary_secondaries syscategories |
Granted for Log Shipping monitoring |
sysjobactivity sysjobs sysjobhistory |
Granted for Jobs and Replication monitoring |
dbm_monitor_data dbm_monitor |
Granted for Mirroring monitoring |
sysalerts agent_datetime |
Granted for Agent alerts and services |
For Amazon RDS for SQL Server, the msdb database requires the SQLAgentUserRole fixed database role.
For Amazon RDS for SQL Server, Master user should have access to all databases in the instance.
The file used for manually granting permissions, DB_SQL_Server_Grant_Permission_Script.sql, can be obtained by clicking on the ‘View script’ link located under the Instances table. This option is accessible through either of the following methods:
When running the Monitor SQL Database wizard, the script link is in the Insufficient Privileges dialog screen. In the Cartridges - Components for Download screen.
Running this file requires one of the following server roles:
Server admin
Active Directory admin
Member of the db_owner
To manually run the Grant Permissions script:
After setting the pre-requisites, you can install and monitor a SQL server instance. For more information, refer to Installing and Monitoring a Single SQL Server Instance.