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


    
    

    SQL> set autotrace traceonly
    SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
    SP2-0611: Error enabling STATISTICS report

    平常都用sys,system用户使用autotrace,今天使用其他用户执行set autotrace 的时候报错:
    SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
    SP2-0611: Error enabling STATISTICS report
    
    是该用户没有授予PLUSTRACE这个角色的权限。
    SYS AS SYSDBA@oemrep>grant PLUSTRACE to test2;
    grant PLUSTRACE to test2
          *
    ERROR at line 1:
    ORA-01919: role 'PLUSTRACE' does not exist
    
    授权发现PLUSTRACE角色不存在,查看官方文档后执行以下sql
    SYS AS SYSDBA@oemrep>@$ORACLE_HOME/sqlplus/admin/plustrce.sql
    SYS AS SYSDBA@oemrep>
    SYS AS SYSDBA@oemrep>drop role plustrace;
    drop role plustrace
              *
    ERROR at line 1:
    ORA-01919: role 'PLUSTRACE' does not exist
    
    SYS AS SYSDBA@oemrep>create role plustrace;
    
    Role created.
    SYS AS SYSDBA@oemrep>
    SYS AS SYSDBA@oemrep>grant select on v_$sesstat to plustrace;
    
    Grant succeeded.
    SYS AS SYSDBA@oemrep>grant select on v_$statname to plustrace;
    
    Grant succeeded.
    SYS AS SYSDBA@oemrep>grant select on v_$mystat to plustrace;
    
    Grant succeeded.
    SYS AS SYSDBA@oemrep>grant plustrace to dba with admin option;
    
    Grant succeeded.
    SYS AS SYSDBA@oemrep>grant PLUSTRACE to test2;
    
    Grant succeeded.
    
    至此,问题解决。
    --------------------- 
  • 相关阅读:
    iOS开发拓展篇—音频处理(音乐播放器5)
    在Unity中接入Xbox360手柄
    POJ 2531 Network Saboteur(DFS)
    小塔1024实现
    Cocos2dx--开发环境搭建
    2.7 视图合并
    Cocos2d-X开发中国象棋《四》设计游戏场景
    libsqlite3.dylib与libsqlite3.0.dylib的差别
    AsyncTask
    开发,从需求出发 · 之二 造飞机的工厂
  • 原文地址:https://www.cnblogs.com/chendian0/p/11209176.html
Copyright © 2020-2023  润新知