Database user privileges
Create the Oracle account that dbCove uses on each database, and give it the grants for the features that you use.
For a SQL Server or PostgreSQL instance, see SQL Server permissions or PostgreSQL permissions. For a MySQL instance or a MongoDB replica set, see MySQL privileges or MongoDB role on this page.
Create the account
Connect as SYS or a different DBA. For a pluggable database, connect to that PDB.
Create the user and give it CREATE SESSION:
CREATE USER DBCOVE_MONITOR IDENTIFIED BY "<password>"; GRANT CREATE SESSION TO DBCOVE_MONITOR;Give it read access to the data dictionary.
SELECT ANY DICTIONARYis also correct. If your site does not permit the role, grant the views one by one.GRANT SELECT_CATALOG_ROLE TO DBCOVE_MONITOR;Add the pack grants and the feature grants for the features that you use.
In Add Database, save the account as a credential and click Test Connection.
In the root of a container database, the account is a common user: its name usually starts with C##. Use a password that does not expire, or plan its change. Radar Engine warns you 30 days before it expires.
The GRANT script
When grants are missing, click Show Script after the test. Each tab has one script, with only the missing GRANT statements.
| Tab | What it is for | Required to add the database |
|---|---|---|
| Monitoring | What dbCove reads: the dictionary views, and the Packs grants while the pack switch is on. | Yes |
| Automation | Kill session and datafile automation: ALTER SYSTEM and ALTER TABLESPACE. | No |
| Add-ons | Archiving, Compression and Statistics: ALTER ANY TABLE, ALTER ANY INDEX, ANALYZE ANY and more. | No |
For the views, the Monitoring script asks for one role:
GRANT SELECT_CATALOG_ROLE TO DBCOVE_MONITOR;
If the account already has SELECT_CATALOG_ROLE or SELECT ANY DICTIONARY, the script grants the missing views one by one. It uses their SYS names, such as V_$SESSION, because a grant on a synonym does not work. If the account has no CREATE SESSION, the scripts have all the grants, CREATE SESSION first.
Run the scripts as SYS, then click Test Connection again. For a pluggable database, run them in that PDB, also when you registered its container.
Grant the views one by one
Some sites do not permit SELECT_CATALOG_ROLE. For them, the dialog has the same scripts with one GRANT for each view.
Click Show Script.
Click Individual Grants on the tab bar. Catalog Role shows the script with the role again.
Copy the Monitoring script and ask a DBA to run it as SYS.
Click Test Connection again.
The script has the required views first, then the views of the optional features. If a required view is still missing, the test fails, and the dialog opens on Individual Grants with only the missing grants. The Add-ons script then also has the views that the add-ons read.
Without the role, two things do not work: Objects cannot show the DDL of an object, and Radar Engine cannot check guaranteed restore points. Oracle gives these only to an account with SELECT_CATALOG_ROLE or a wider privilege.
Fix a missing grant
When a grant goes away later, the database shows Warning on the Databases page. Its panel shows the Oracle error, usually ORA-00942 or ORA-01031.
Right-click the database and select Edit Database.
Click Test Connection, then Show Script.
Ask a DBA to run the script as SYS.
The problem clears at the next run.
The four tiers
The test checks four tiers of grants. It finds a grant in all its forms: direct, through a role, through SELECT ANY DICTIONARY or EXECUTE ANY PROCEDURE, or to PUBLIC.
| Tier | What it holds | Required |
|---|---|---|
| Required | SELECT on the 134 views that dbCove reads. | Yes |
| Packs | 8 grants for the Diagnostics Pack and Tuning Pack features. | While the pack switch is on |
| Features | 44 grants, each for one optional action or feature. | No |
| Recommended | 118 views that dbCove does not read. The scripts do not ask for them. | No |
Required grants
Monitoring needs SELECT on these 134 views. Without one of them, you cannot add the database.
| Area | Views | Used by |
|---|---|---|
| Instance and configuration | 24 | Inventory, parameters, patch level, services and License. |
| Sessions, waits, undo and temp | 9 | Live Activity and the Dashboard. |
| SQL and schema objects | 25 | Insights, SQL details and Radar checks. |
| Object details | 11 | Objects. |
| Memory | 20 | Memory and the memory advisors. |
| Metrics | 4 | Metrics and service statistics. |
| Storage | 23 | Tablespaces, datafiles, segments, ASM, the fast recovery area and file I/O. |
| Redo, backup and Data Guard | 14 | Redo, RMAN backups and apply lag. |
| Exadata | 4 | The storage cells on the Exadata page. |
GRANT SELECT ON SYS.V_$INSTANCE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$INSTANCE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$DATABASE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$DATABASE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$PDBS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$VERSION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$CONTAINERS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$OSSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$PARAMETER TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$PARAMETER TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$RESOURCE_LIMIT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$PROCESS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$OSSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SYSSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SESSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$STATNAME TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$STATNAME TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$LISTENER_NETWORK TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_USERS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SERVICES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_FEATURE_USAGE_STATISTICS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.CDB_FEATURE_USAGE_STATISTICS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_REGISTRY_SQLPATCH TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$DIAG_INFO TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SESSION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SESSION_LONGOPS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SORT_USAGE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$TRANSACTION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$ROLLSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_ROLLBACK_SEGS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$UNDOSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_UNDO_EXTENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$PX_SESSION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQL TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SQL TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQLSTATS_PLAN_HASH TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQLSTATS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQL_PLAN TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQL_BIND_CAPTURE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SQL_PROFILES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SQL_PLAN_BASELINES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_OBJECTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_PROCEDURES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SYNONYMS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TABLES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_COLUMNS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_STATISTICS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_INDEXES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_IND_COLUMNS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_IND_EXPRESSIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_INDEX_USAGE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_CONSTRAINTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_CONS_COLUMNS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_OPTSTAT_OPERATIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SEQUENCES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SCHEDULER_JOB_RUN_DETAILS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SCHEDULER_JOB_LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_IDENTITY_COLS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_VIEWS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_MVIEWS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TRIGGERS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SOURCE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_DEPENDENCIES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_ERRORS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_PRIVS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_COMMENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_COL_COMMENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_DB_LINKS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SCHEDULER_JOBS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SGAINFO TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SGASTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SGASTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$PGASTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$MEMORY_DYNAMIC_COMPONENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SGA_DYNAMIC_COMPONENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SGA_RESIZE_OPS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$MEMORY_RESIZE_OPS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$LIBRARYCACHE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$ROWCACHE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SHARED_POOL_RESERVED TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQL_WORKAREA_HISTOGRAM TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$DB_CACHE_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SHARED_POOL_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$PGA_TARGET_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SGA_TARGET_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$MEMORY_TARGET_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$DB_CACHE_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$PGA_TARGET_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SGA_TARGET_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SYSMETRIC_HISTORY TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$CON_SYSMETRIC_HISTORY TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SYSMETRIC_HISTORY TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SERVICE_STATS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TABLESPACES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TABLESPACE_USAGE_METRICS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_DATA_FILES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SEGMENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_PARTITIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_SUBPARTITIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_IND_PARTITIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_PART_INDEXES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_IND_SUBPARTITIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_LOB_PARTITIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_LOB_SUBPARTITIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_LOBS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_PART_TABLES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_PART_KEY_COLUMNS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$ASM_DISKGROUP TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$ASM_DISK TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$RECOVERY_FILE_DEST TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$RECOVERY_AREA_USAGE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$RESTORE_POINT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$FILESTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$DATAFILE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$TABLESPACE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SEGMENT_STATISTICS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$ARCHIVED_LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$ARCHIVED_LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$LOGFILE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$STANDBY_LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$LOG_HISTORY TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$RMAN_BACKUP_JOB_DETAILS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$RMAN_STATUS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$BACKUP_SET_DETAILS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$BACKUP_DATAFILE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$ARCHIVE_DEST_STATUS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$ARCHIVE_DEST TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$DATAGUARD_STATS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$CELL TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$CELL_CONFIG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$CELL_OPEN_ALERTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$CELL_GLOBAL_HISTORY TO DBCOVE_MONITOR;
Diagnostics and Tuning Pack grants
dbCove checks these grants only while the Diagnostics and Tuning Pack switch of the database is on. The automatic plan fix also needs them.
| Grant | Used for |
|---|---|
ADMINISTER SQL MANAGEMENT OBJECT | SQL plan baselines and SQL profiles. |
EXECUTE on DBMS_SPM | SQL plan baselines. |
SELECT on DBA_HIST_SQLSTAT, DBA_HIST_SNAPSHOT | Load a plan from AWR into a baseline. |
EXECUTE on DBMS_SQLTUNE | The SQL Monitor report, the SQL Tuning Advisor, and a SQL profile from a plan. |
ADVISOR | A SQL Tuning Advisor task. |
SELECT on GV$SQL_MONITOR, GV$SQL_PLAN_MONITOR | The SQL Monitor report. |
GRANT ADMINISTER SQL MANAGEMENT OBJECT TO DBCOVE_MONITOR;
GRANT EXECUTE ON SYS.DBMS_SPM TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_HIST_SQLSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_HIST_SNAPSHOT TO DBCOVE_MONITOR;
GRANT EXECUTE ON SYS.DBMS_SQLTUNE TO DBCOVE_MONITOR;
GRANT ADVISOR TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQL_MONITOR TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SQL_PLAN_MONITOR TO DBCOVE_MONITOR;
Feature grants
Each grant is for one action. Without it, that action fails with the Oracle error, and all other features work.
| Grant | Used for |
|---|---|
ALTER SYSTEM | Kill a session, and stop the sessions of an add-on run. See Kill sessions. |
ALTER TABLESPACE | Automatic datafiles. |
ALTER ANY TABLE, ALTER ANY INDEX | Compression: move tables and rebuild indexes. |
ANALYZE ANY | Statistics. |
ANALYZE ANY DICTIONARY | Statistics on the dictionary and on fixed objects. |
EXECUTE on DBMS_COMPRESSION, DBMS_SPACE | The recompression analysis. |
SELECT on DBA_EXTENTS, DBA_TAB_COLS, DBA_POLICIES, DBA_MVIEW_LOGS, DBA_LOG_GROUPS, V$OPTION; EXECUTE on DBMS_ROWID | Archiving. Without them, archiving cannot run on the table. |
SELECT on DBA_TAB_MODIFICATIONS, DBA_EXTERNAL_TABLES | Statistics and the recompression analysis: the changes since the last gather. |
SELECT on V$CONTROLFILE_RECORD_SECTION, GV$SORT_SEGMENT, DBA_TS_QUOTAS, DBA_SYS_PRIVS, DBA_TABLESPACE_GROUPS, DBA_JOBS, GV$CON_SYSSTAT | More Radar Engine checks. Without them, Radar skips these checks. |
SELECT on V$DATAFILE_COPY | Image copies as backups. |
SELECT on GV$RMAN_OUTPUT | The RMAN output of a backup in Health Check. |
SELECT on V$PWFILE_USERS, V$PROCESS, V$SESSTAT, V$SORT_USAGE, V$TRANSACTION, V$SHARED_POOL_ADVICE, V$LOGFILE, V$FLASHBACK_DATABASE_LOG, DBA_RECYCLEBIN, DBA_TEMP_FILES, DBA_ROLES, DBA_PROFILES, DBA_SUBPART_KEY_COLUMNS | More checks of dbCove AI. Without a view, the answer names the missing grant. |
SELECT on V$SESSION | dbCove AI, and Compression: to stop a run on the database server. |
SELECT on DBA_ROLE_PRIVS, DBA_USERS_WITH_DEFPWD | The Account security audit report, and dbCove AI. |
SELECT on V$ASM_DISK_STAT, V$ASM_DISKGROUP_STAT | Exadata: the ASM capacity without a disk discovery. |
GRANT ALTER SYSTEM TO DBCOVE_MONITOR;
GRANT ALTER TABLESPACE TO DBCOVE_MONITOR;
GRANT ALTER ANY TABLE TO DBCOVE_MONITOR;
GRANT ALTER ANY INDEX TO DBCOVE_MONITOR;
GRANT ANALYZE ANY TO DBCOVE_MONITOR;
GRANT ANALYZE ANY DICTIONARY TO DBCOVE_MONITOR;
GRANT EXECUTE ON SYS.DBMS_COMPRESSION TO DBCOVE_MONITOR;
GRANT EXECUTE ON SYS.DBMS_SPACE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_EXTENTS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_COLS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_POLICIES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_MVIEW_LOGS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_LOG_GROUPS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$OPTION TO DBCOVE_MONITOR;
GRANT EXECUTE ON SYS.DBMS_ROWID TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TAB_MODIFICATIONS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_EXTERNAL_TABLES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$CONTROLFILE_RECORD_SECTION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$SORT_SEGMENT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TS_QUOTAS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SYS_PRIVS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TABLESPACE_GROUPS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$DATAFILE_COPY TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$RMAN_OUTPUT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$PWFILE_USERS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SESSION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$PROCESS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SESSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SORT_USAGE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$TRANSACTION TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$SHARED_POOL_ADVICE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$LOGFILE TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$FLASHBACK_DATABASE_LOG TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_RECYCLEBIN TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_TEMP_FILES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_ROLE_PRIVS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_ROLES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_PROFILES TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_USERS_WITH_DEFPWD TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_SUBPART_KEY_COLUMNS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.DBA_JOBS TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.GV_$CON_SYSSTAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$ASM_DISK_STAT TO DBCOVE_MONITOR;
GRANT SELECT ON SYS.V_$ASM_DISKGROUP_STAT TO DBCOVE_MONITOR;
Kill sessions
To kill a session, dbCove runs this statement with the database credential:
ALTER SYSTEM KILL SESSION 'sid,serial#,@inst_id' IMMEDIATE
Oracle has no smaller privilege for this. ALTER SYSTEM also lets the account change parameters, so give it only where dbCove must kill sessions. The dbCove user also needs Kill sessions.
Recommended grants
SELECT on 118 more views, for example GV$LOCK and DBA_FREE_SPACE. dbCove does not read them: they are for a later release, dbCove AI or your reports. SELECT_CATALOG_ROLE and SELECT ANY DICTIONARY cover them. The Individual Grants script does not ask for them.
MySQL privileges
dbCove signs in to a MySQL instance as an account with a password. Test Connection tries each privilege, so a privilege that the account holds through a role counts only when the role is active at sign-in.
| Privilege | Used for | Required |
|---|---|---|
PROCESS | Every session, and the transactions and tables of InnoDB. | Yes |
REPLICATION CLIENT | The replication status. | Yes |
SELECT on performance_schema | Activity, statements, waits and locks. | Yes |
REFERENCES on *.* | The schemas and the sizes of their tables. dbCove reads no rows of your tables. | Yes |
SELECT on 7 columns of mysql.user | The account checks. dbCove never reads the password hashes. | No |
The script that Test Connection gives for a new account:
CREATE USER 'dbcove_monitor'@'%' IDENTIFIED BY '<password>' PASSWORD EXPIRE NEVER;
GRANT PROCESS, REPLICATION CLIENT, REFERENCES ON *.* TO 'dbcove_monitor'@'%';
GRANT SELECT ON performance_schema.* TO 'dbcove_monitor'@'%';
The optional part:
GRANT SELECT (Host, User, plugin, account_locked, password_expired, password_last_changed, password_lifetime) ON mysql.user TO 'dbcove_monitor'@'%';
A replica takes no writes: run the script on its source. The grants reach the replica by replication.
MongoDB role
dbCove signs in to each member of a replica set as a MongoDB user with a password. The script of Test Connection makes a role, dbcoveMonitor, and gives it to the user. Test Connection checks each action, not the name of a role: a user that has the actions through another role, for example root, also passes.
| Actions | On | Used for |
|---|---|---|
serverStatus, top, getCmdLineOpts, hostInfo, getParameter, getDefaultRWConcern, connPoolStats | The cluster | Server metrics, connections and settings. |
replSetGetStatus, replSetGetConfig | The cluster | The members, their state and replication. |
inprog | The cluster | The operations that run now. |
getLog | The cluster | The server log. |
listDatabases; listCollections, collStats, dbStats on each database and on config | The databases | The databases, the collections and their sizes. |
listIndexes, indexStats, planCacheRead | Each database | The indexes, their use and the query plans. |
listCollections, collStats, dbStats on local, and collStats on local.oplog.rs | local | The size of the oplog. dbCove does not read the oplog. |
queryStatsRead, queryStatsReadTransformed | The cluster | Optional: the statistics of each query shape. The server must also collect them (internalQueryStatsRateLimit above 0). |
Run the script in mongosh on the primary, as a user that can make roles and users, for example with userAdminAnyDatabase. The script does not give clusterMonitor: that role can read the oplog and the documents of the profiler, and it does not have listCollections, listIndexes and planCacheRead.
Related
Updated November 29, 2026