SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

问题描述:
当我们使用非系统用户查看Autotrace时,会出现下面的错误,提示PLUSTRACE角色未被激活,错误信息如下:
[oracle@strong ~]$ sqlplus scott/scott

SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 9 14:02:06 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> 
解决方案:
事实上PLUSTRACE角色并不存在,Oracle提供了对应的脚本,只要执行下即可,切换到系统用户SYS,执行下面的脚本,然后把PLUSTRACE授予Public,这样就可以访问了。
SQL> @?/sqlplus/admin/plustrce.sql
SQL> grant plustrace to public;


posted @ 2017-09-09 15:46  追梦男生  阅读(108)  评论(0编辑  收藏  举报