普通用户使用 autotrace,出现如下报错:
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS repor
第一反应是授予用用户 plustrace 角色
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to oak;
grant plustrace to oak
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
报角色不存在错误
plustrace 角色在数据库 创建时并不会创建
这个角色可通过运行下面的 sql 来创建
$ORACLE_HOME/sqlplus/admin/plustrce.sql
授予用户 plustrace 角色
SQL> grant plustrace to oak;
Grant succeeded.
启用 autotrace
SQL> set autotrace on
至此问题解决
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29135257/viewspace-1814867/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29135257/viewspace-1814867/