首先执行:
set
autotrace
on
报错:
无法找到会话标识符。启用检查 PLUSTRACE 角色
启用 STATISTICS 报告时出错
认为没有赋权执行:
grant PLUSTRACE to zlchs
报错:
角色 'PLUSTRACE' 不存在
执行:
create role plustrace;
grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$mystat to plustrace;
grant plustrace to dba with admin option;
grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$mystat to plustrace;
grant plustrace to dba with admin option;
成功。执行 set autotrace on