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. unity对话代码

    这个是根据网上unity GUI打字机教程修改的 原教程是JS,我给改成了C#,然后增加了许多功能 这个教程能实现一段文字对话,有打字机显示效果,能写许多对话,能快进对话,总之现在RPG游戏里有的功能 ...

  2. leetcode 187. Repeated DNA Sequences 求重复的DNA串 ---------- java

    All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACG ...

  3. case when then else end 的用法

    case when then end 改语句的执行过程是:将case后面表达式的值与各when子句中的值进行比较,如果两者相等,则返回then后的表达式的值,然后跳出case语句,否则返回else子句 ...

  4. Linux运维入门到高级全套常用要点

    Linux运维入门到高级全套常用要点 目 录 1. Linux 入门篇................................................................. ...

  5. 影响div背景色显示的问题

    说来惭愧,走上程序猿这条不归路已经一年了,却连自己的博客都没有.看到道上有脸面的大神博客都做得贼漂亮~~于是,按捺不住了~~ 今天终于开通了博客园博客,正式开始我的博客人生啦!!!~~吼吼~~ 废话少 ...

  6. day26 分布式监控系统开发

    本节内容 为什么要做监控? 常用监控系统设计讨论 监控系统架构设计 监控表结构设计 为什么要做监控? –熟悉IT监控系统的设计原理 –开发一个简版的类Zabbix监控系统 –掌握自动化开发项目的程序设 ...

  7. windows脚本调用批处理

    set ws=wscript.createobject(“wscript.shell”)ws.run “batchfn.bat /start”,0 save as xxx.vbe file.

  8. CSS 相邻兄弟选择器

    相邻兄弟选择器(Adjacent sibling selector)可选择紧接在另一元素后的元素,且二者有相同父元素. 选择相邻兄弟 如果需要选择紧接在另一个元素后的元素,而且二者有相同的父元素,可以 ...

  9. Adaptive Decontamination of the Training Set: A Unified Formulation for Discriminative Visual Tracking

    Martin Danelljan 判决类追踪模型是由训练样本学习得到,但是为了适应目标和背景的变化sample set在每一帧中都会更新. 令(xjk, yjk)表示第k帧k={1,2,...,t}中 ...

  10. Django+uwsgi+Nginx安装部署

    安装 安装Nginx Nginx是最流行的高性能HTTP服务器. 安装pcre: wget https://sourceforge.net/projects/pcre/files/pcre/8.37/ ...