报错信息:
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
说明:
Oracle下普通用户缺少set autotrace功能的权限;
解决方式:赋予相关权限:
grant select on v_$sesstat to scott;
grant select on v_$statname to scott;
grant select on v_$mystat to scott;
如下: