-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoracle_grants.sql
51 lines (46 loc) · 2.02 KB
/
oracle_grants.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
For all Oracle version:
CREATE PROFILE ZABBIXMON_UNLIMITED_PWD LIMIT PASSWORD_LIFE_TIME UNLIMITED;
For all Oracle version:
CREATE USER zabbixmon IDENTIFIED BY "XXXXXXX" DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE TEMP PROFILE ZABBIXMON_UNLIMITED_PWD ACCOUNT UNLOCK;
ALTER USER zabbixmon DEFAULT ROLE ALL;
GRANT CONNECT TO zabbixmon;
GRANT RESOURCE TO zabbixmon;
GRANT CREATE SESSION TO zabbixmon;
GRANT SELECT ANY DICTIONARY TO zabbixmon;
GRANT UNLIMITED TABLESPACE TO zabbixmon;
GRANT SELECT ON V_$SESSION TO zabbixmon;
GRANT SELECT ON V_$SYSTEM_EVENT TO zabbixmon;
GRANT SELECT ON V_$EVENT_NAME TO zabbixmon;
GRANT SELECT ON V_$RECOVERY_FILE_DEST TO zabbixmon;
GRANT SELECT ON V_$ARCHIVED_LOG TO zabbixmon;
GRANT SELECT ON V_$DATABASE TO zabbixmon;
GRANT SELECT ON V_$INSTANCE TO zabbixmon;
GRANT SELECT ON V_$ARCHIVE_GAP TO zabbixmon;
GRANT SELECT ON V_$MANAGED_STANDBY TO zabbixmon;
GRANT SELECT ON V_$FLASH_RECOVERY_AREA_USAGE TO zabbixmon;
GRANT SELECT ON V_$DATABASE_INCARNATION TO zabbixmon;
GRANT SELECT ON V_$ARCHIVE_DEST_STATUS TO zabbixmon;
GRANT SELECT ON V_$RESOURCE_LIMIT TO zabbixmon;
GRANT SELECT ON V_$BACKUP TO zabbixmon;
GRANT SELECT ON V_$DATAFILE TO zabbixmon;
GRANT SELECT ON V_$DBFILE TO zabbixmon;
GRANT SELECT ON V_$PARAMETER TO zabbixmon;
GRANT SELECT ON V_$PROCESS TO zabbixmon;
GRANT SELECT ON V_$SESSION_WAIT TO zabbixmon;
GRANT SELECT ON GV_$INSTANCE TO zabbixmon;
GRANT SELECT ON GV_$SESSION TO zabbixmon;
If monitoring Oracle ASM:
GRANT SELECT ON V_$ASM_DISKGROUP_STAT TO zabbixmon;
If rdbms_version>=12
GRANT SELECT ON CDB_TABLESPACES TO zabbixmon;
GRANT SELECT ON CDB_TABLESPACE_USAGE_METRICS TO zabbixmon;
GRANT SELECT ON CDB_DATA_FILES TO zabbixmon;
GRANT SELECT ON DBA_PDBS TO zabbixmon;
GRANT SELECT ON V_$PDBS TO zabbixmon;
GRANT SELECT ON V_$PDB_INCARNATION TO zabbixmon;
GRANT SELECT ON V_$CONTAINERS TO zabbixmon;
If monitoring Oracle Data Guard:
GRANT SYSDBA TO zabbixmon;
If monitoring Oracle ASM connect to Oracle ASM instance and create user:
CREATE USER zabbixmon IDENTIFIED BY "XXXXXXX";
GRANT SYSASM TO zabbixmon;