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. Oracle 数据库SQL性能查看

    作为一个开发/测试人员,或多或少都得和数据库打交道,而对数据库的操作归根到底都是SQL语句,所有操作到最后都是操作数据,那么对sql性能的掌控又成了我们工作中一件非常重要的工作.下面简单介绍下一些查看 ...

  2. 给linux 授权一个可以远程登录的账户

    创建用户:grant all on *.* to '; 授权:flush privileges;

  3. string.join(iterable)

    str.join(iterable) Return a string which is concatenation the  of the strings in the iterable iterab ...

  4. SHOI 2009 会场预约 平衡树 STL练习

    题目描述 PP大厦有一间空的礼堂,可以为企业或者单位提供会议场地.这些会议中的大多数都需要连续几天的时间(个别的可能只需要一天),不过场地只有一个,所以不同的会议的时间申请不能够冲突.也就是说,前一个 ...

  5. 从NDK开始吧

    1.eclipse,环境配置略:Window-->Preferences-->Android-->NDK 2.Studio

  6. centos6.3环境下升级python及MySQLdb的安装

    近来突然想鼓捣下linux下的python,看下Python数据库方面的东西,想着在centos下测试下.然而安装的过程有很多坑.下面对整个流程进行下记录 1.python基本库的安装 在安装pyth ...

  7. windosw应用提示内存不足

    找到如下注册表分支: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ CurrentVersion\Windows 在右侧窗口中可以看到名为&quo ...

  8. android studio 插件

    引用于:http://www.zhihu.com/question/28026027 adb-idea 支持直接在AS面板中进行ADB操作,个人觉得太实用,上面有哥们已提及,这里再介绍下: Unins ...

  9. ajaxpro 异步调用

    AjaxPro一般默认是同步调用,异步调用只需要在方法后面加一个callback函数,直接取value属性即可.例如: MyNameSpace.Page1.getOtherConfig("A ...

  10. sap 取货币之间汇率

    FORM FRM_GET_KURSK USING PV_KURST "M PV_FCURR PV_TCURR PV_PRSDT CHANGING PV_KURSK. DATA: LV_RAT ...