【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 Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
切换到sysdba下,授予权限
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to scott;
grant plustrace to scott
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
执行脚本:
SQL> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
执行完后
查看该sql脚本的内容:
-----------------------------------------------------------------------------------------------------------
[oracle@zhang admin]$ more plustrce.sql
--
-- Copyright (c) Oracle Corporation 1995, 2002. All Rights Reserved.
--
-- NAME
-- plustrce.sql
--
-- DESCRIPTION
-- Creates a role with access to Dynamic Performance Tables
-- for the SQL*Plus SET AUTOTRACE ... STATISTICS command.
-- After this script has been run, each user requiring access to
-- the AUTOTRACE feature should be granted the PLUSTRACE role by
-- the DBA.
--
-- USAGE
-- sqlplus "/ as sysdba" @plustrce
--
-- Catalog.sql must have been run before this file is run.
-- This file must be run while connected to a DBA schema.
set echo on
drop role plustrace;
create role plustrace;
grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$mystat to plustrace;
grant plustrace to dba with admin option;
set echo off
------------------------------------------------------------------------------------------------
手动执行下面的sql,可以手动生成role
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
SQL> grant select on v_$sesstat to plustrace;
Grant succeeded.
SQL> grant select on v_$statname to plustrace;
Grant succeeded.
SQL> grant select on v_$mystat to plustrace;
Grant succeeded.
SQL> grant plustrace to dba with admin option;
Grant succeeded.
SQL> grant plustrace to scott;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> set autotrace traceonly
成功,没有报错了
【ORACLE错误】SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled的更多相关文章
- 【小错误】SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
1.今天在scott用户下执行语句跟踪时报了如下错误: SCOTT@ORA11GR2>set autotrace on SP2: Cannot find the Session Identifi ...
- 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 ...
- 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 ...
- Cannot find the Session Identifier. Check PLUSTRACE role is enable
解决方法: SQL> conn / as sysdbaConnected.SQL> @$ORACLE_HOME/rdbms/admin/utlxplan.sql; Table create ...
- 使用普通用户set autotrace on报错SP2-0618: Cannot find the Session Identifier
普通用户使用 autotrace,出现如下报错: SQL> set autotrace on SP2-0618: Cannot find the Session Identifier. Che ...
- 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 ...
- Oracle 错误总结及问题解决 ORA
参考地址 ORA-00001: 违反唯一约束条件 (.)错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常.ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数O ...
- Oracle 错误收集
Oracle 错误大全 ORA-00001: 违反唯一约束条件 (.)ORA-00017: 请求会话以设置跟踪事件ORA-00018: 超出最大会话数ORA-00019: 超出最大会话许可数ORA-0 ...
- oracle导入数据库报错:IMP-00019: 由于 ORACLE 错误 12899 而拒绝行 IMP-00003: 遇到 ORACLE 错误 12899
主要是字符集 成 导入的Oracle服务器的字符集 对应不上. 以下方案为是修改服务器的字符集. 这样会影响之前的Oracle其他数据库的数据显示(正式服务器慎用) 个人认为应该修改导出文件的字 ...
随机推荐
- ES6新增数据类型Symbol
Symbol的含义? ES6(2015) 引入了第七种原始数据类型Symbol,Symbol英文文意思为 符号.象征.标记.记号,在 js 中更确切的翻译应该为独一无二的 Symbol的使用? Sym ...
- 带你探究Python的诞生和由来
最近,Python语言越来越火,那什么是Python?它怎么诞生的?它跟C语言.shell语言有什么区别?语言环境是怎么样的?下面,跟着我的步伐,一起去了解一下吧~ Python 诞生在一个圣诞节 P ...
- Git常用命令大全,迅速提升你的Git水平
原博文 https://mp.weixin.qq.com/s/hYjGyIdLK3UCEVF0lRYRCg 示例 初始化本地git仓库(创建新仓库) git init ...
- 磁盘配额,通过ManagementClass("Win32_DiskQuota")
C# using System; using System.Collections.Generic; using System.Management; namespace ConsoleApp2 { ...
- Blogs实现侧边公告栏设置
说明:只需要在博客侧边栏公告(支持HTML代码) (支持 JS 代码)里面添加如下代码 #1.博客运行时长统计 <!--博客运行时长显示开始--!> <div id="sh ...
- 基于LNMP架构搭建wordpress博客之安装架构说明
架构情况 架构情况:基于LNMP架构搭建wordpress系统 软件包版本说明: 系统要求 : CentOS-6.9-x86_64-bin-DVD1.iso PHP版本 : php-7.2.29 ...
- [.NET] - 在Socket编程中遇到的问题总结
问题1.无法访问已释放的对象. 对象名:"System.Net.Sockets.Socket" 产生这个scenario的原因是程序中的某个地方调用到了socket.close后, ...
- python初学者-使用for循环做一个九九乘法表
for i in range(1, 10): for j in range(1, i + 1): print(j, '*', i, '=', i * j, end=" ") #en ...
- 跳表(SkipList)设计与实现(Java)
微信搜一搜「bigsai」关注这个有趣的程序员 文章已收录在 我的Github bigsai-algorithm 欢迎star 前言 跳表是面试常问的一种数据结构,它在很多中间件和语言中得到应用,我们 ...
- MySQL中的模糊查询 like 和 Oracle中的 instr() 函数有同样的查询效果
注:MySQL中的模糊查询 like 和 Oracle中的 instr() 函数有同样的查询效果: 如下所示: MySQL: select * from tableName where name li ...