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-trasnlate函数

    1.translate函数语法 TRANSLATE(string,from_str,to_str) 2.作用有两个: 1)可以替换string中的对应字符,from_str和to_str会做字符的一一 ...

  2. PHP 与pdf文档 与条码

    必要的步骤 1.导入require_once "tcpdf/tcpdf.php"; 工具源码在demo中 2.$pdf = new TCPDF("P", &qu ...

  3. 11.12模拟考T2(GCD)

    2.梅花桩   (blossom.pas/c/cpp) [问题描述] 小x在练习一门轻功,这门轻功是在梅花桩上跳来跳去,这门轻功是严格按照直线从一个梅花桩直接跳到另外一个梅花桩上.因为小x有恐高症,所 ...

  4. WIN7下搭建CORDOVA环境

    Cordova 环境搭建 1安装JDK 工具文件夹中:jdk目录 1)下载地址:http://www.oracle.com/technetwork/java/javase/downloads/inde ...

  5. Chapter 1: Design the application architecture

    1.1 Plan the application layers 提到了repository pattern,SoC(Separation of Concern), 进而提及MVC,Action/Act ...

  6. MVC学习笔记-01

    什么是MVC MVC是指(Model-View-Controll即模型-视图-控制器)用于表示表示一种软件架构模式,它把软件分成三个基本的部分:模型(Model),视图(view),控制器(Contr ...

  7. C#如何利用QQ邮箱SMTP发送邮件

    public void SendEmail() { MailMessage msg = new MailMessage(); msg.To.Add("to@qq.com");//收 ...

  8. es6 ... 表达

    ... 包含0个或n个属性, { ...state.counters [id]: state.counters[id] - 1 } 只改变其中的id相对应的属性,其他保持不变

  9. winform中ComboBox实现text和value,使显示和值分开,重写text和value属性

    winform的ComboBox中只能赋值text,显示和值是一样的,很多时候不能满足根本需要,熟悉B/S开发的coder最常用的就是text和value分开的,而且web下DropDownList本 ...

  10. 关于在DataGrid.RowDetailsTemplate中的控件查找不到的问题

    DataGrid.RowDetailsTemplate中的控件需要显示出来才能查找,可以尝试在MouseLeftButtonUp等事件中处理.