1.今天在scott用户下执行语句跟踪时报了如下错误:

SCOTT@ORA11GR2>set autotrace on
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report

2.通过上述问题分析,是由于scott用户没有PLUSTRACE角色,执行PLUSTRACE角色:

[oracle@host02 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/
[oracle@host02 admin]$ ls
glogin.sql help libsqlplus.def plustrce.sql pupbld.sql
[oracle@host02 admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin SYS@ORA11GR2>@/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/plustrce.sql
SYS@ORA11GR2>
SYS@ORA11GR2>drop role plustrace;
drop role plustrace
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist SYS@ORA11GR2>create role plustrace; Role created. SYS@ORA11GR2>
SYS@ORA11GR2>grant select on v_$sesstat to plustrace; Grant succeeded. SYS@ORA11GR2>grant select on v_$statname to plustrace; Grant succeeded. SYS@ORA11GR2>grant select on v_$mystat to plustrace; Grant succeeded. SYS@ORA11GR2>grant plustrace to dba with admin option; Grant succeeded. SYS@ORA11GR2>
SYS@ORA11GR2>set echo off

3.将plustrace角色给scott用户:

SYS@ORA11GR2>grant plustrace to scott;

Grant succeeded.

SYS@ORA11GR2>conn scott/tiger
Connected. Session altered. SCOTT@ORA11GR2>set auto on

这样scott用户就可以开启会话跟踪了。

【小错误】SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled的更多相关文章

  1. 【ORACLE错误】SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

    执行set autotrace traceonly的时候,报错 SQL> set autotrace traceonly SP2-0618: Cannot find the Session Id ...

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

    SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled 今天是2013-09-17,在今天学习sql ...

  3. Oracle set autotrace 时提示:Cannot find the Session Identifier. Check PLUSTRACE role is enabled

    SQL> set autotrace Usage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]] SQL ...

  4. Cannot find the Session Identifier. Check PLUSTRACE role is enable

    解决方法: SQL> conn / as sysdbaConnected.SQL> @$ORACLE_HOME/rdbms/admin/utlxplan.sql; Table create ...

  5. 使用普通用户set autotrace on报错SP2-0618: Cannot find the Session Identifier

    普通用户使用 autotrace,出现如下报错: SQL> set autotrace on SP2-0618: Cannot find the Session Identifier.  Che ...

  6. SP2-0618: Cannot find the Session Identifier.

    [oracle@trade1 ~]$ sqlplus  user1/user1 SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 6 14:31:1 ...

  7. 记在thinkPHP中一个创建模型的小错误

    在创建好模型以后,访问说没有该方法,如图 看代码 class ManagerModel { //put your code here function checkDenglu($name,$pwd){ ...

  8. 简明Python中的一个小错误

    最近在学Python,先看的是<Python基础教程>,后来经别人推荐,感觉网络上的<简明Python教程>也挺好的,在里面发现一个小错误. 网址如下:http://sebug ...

  9. Unity 安卓Jar包的小错误

    好久没写博客了,也就意味着好久没有学习了,近几天在搞Unity接入有米的SDk遇到了一点小错误,今天早上解决了,和大家分享下! 1,我们的目的是在在U3D中调用Android产生的Jar包,首先在Ec ...

随机推荐

  1. 《C#编程宝典:十年典藏版》阅读笔记(1)

    1.运行时错误,使用Checked块语句进行异常检查与抛出异常. 2.值类型使用线程堆栈保存数据,数据大小大概为1M左右,引用类型使用托管堆保存数据,可以无限分配空间,因为有一个GC垃圾回收机制存在, ...

  2. java常用IO流数据流小结

      类名 常用方法 说明 输入流 InputStream int read(); 只能读字节流,虽然返回值是int,但只有低8位起作用. DataInputStream Type readType() ...

  3. 【转载】javascript与C#的语法区别

    由于博主不允许的情况下不允许转载,我在这里只放上链接 http://blog.csdn.net/ranlianjie/article/details/2484139

  4. https/相对路径,绝对路径

    1. htttps HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全 ...

  5. dict

    1.创建新字典(根据语法和dict初始化方法) >>> my_dict={'a':1,'b':2,'c':3} >>> my_dict=dict({'a':1,'b ...

  6. windows 下 webstorm 使用SVN

    1.安装了webstorm之后,用了很久都没有配置SVN 现在想配置svn,结果发现一般的svn程序不好用. 经指导,发现需要安装一个专用于webstorm的SVN 2.在file->setti ...

  7. org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection 原因

    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection 可能出现的原因     ...

  8. 集成Visual Studio/MSBuild的开发/发布流程和 FIS3

    谁不想让自己的网站速度更快?为此需要多方面的优化,但优化又会增加开发工作量.Fis3 是很不错的前端优化工具,能够让前端的优化变得自动方便,解决前述问题.Fis3是百度开发的,开源的,在国内比较六流行 ...

  9. JavaScript 的循环语句语法摘要

     if条件语句语法: if(condition){ statements; } 理解:圆括号里的是条件参数  ,花括号里的为执行的语句. 示例代码:if(1>2){ alert("Th ...

  10. 关于python怎样编写登录接口

    把今天的成果展示下,关于怎么用python编写登录接口, 要求是   1.输入用户名和密码 2.输错三次密码就锁定用户 3.认证成功后输出欢迎信息 账号文件内容如下: sanjiang sanjian ...