创建Oracle数据库监控用户脚本

CREATE USER “ONEKEEPER” IDENTIFIED BY “Onek11per”;
grant “CONNECT” to “ONEKEEPER”;
grant select on dbaalert_history to “ONEKEEPER”;
grant select on dba_data_files to “ONEKEEPER”;
grant select on dba_hist_snapshot to “ONEKEEPER”;
grant select on dba_hist_tbspc_space_usage to “ONEKEEPER”;
grant select on dba_jobs to “ONEKEEPER”;
grant select on dba_objects to “ONEKEEPER”;
grant select on dba_sys_privs to “ONEKEEPER”;
grant select on dba_tab_privs to “ONEKEEPER”;
grant select on dba_tablespace_usage_metrics to “ONEKEEPER”;
grant select on dba_tablespaces to “ONEKEEPER”;
grant select on dba_users to “ONEKEEPER”;
grant select on v
$archivedest to “ONEKEEPER”;
grant select on v
$archivedlog to “ONEKEEPER”;
grant select on v
$asmdiskgroup to “ONEKEEPER”;
grant select on v
$dispatcher to “ONEKEEPER”;
grant select on v$instance to “ONEKEEPER”;
grant select on v
$latch to “ONEKEEPER”;
grant select on v$latch_children to “ONEKEEPER”;
grant select on v
$log to “ONEKEEPER”;
grant select on v$memory_dynamic_components to “ONEKEEPER”;
grant select on v
$parameter to “ONEKEEPER”;
grant select on v$px_session to “ONEKEEPER”;
grant select on v
$resourcelimit to “ONEKEEPER”;
grant select on v
$rmanstatus to “ONEKEEPER”;
grant select on v
$session to “ONEKEEPER”;
grant select on v$sgastat to “ONEKEEPER”;
grant select on v
$sharedserver to “ONEKEEPER”;
grant select on v
$systime_model to “ONEKEEPER”;
grant select on v
$sysstat to “ONEKEEPER”;
grant select on v$system_event to “ONEKEEPER”;
grant select on v
$tablespace to “ONEKEEPER”;
grant select on dba_free_space to “ONEKEEPER”;