SP2-0618: Cannot find the Session Identifier.Check PLUSTRACE role is enabled
来源:互联网 发布:数组对象方法排序 编辑:程序博客网 时间:2024/06/05 07:02
今天新建数据库使用hr用户练习的时候,set autotrace on时出现以下错误
是因为没有PLUSTRACE权限
涉及到@ORACLE_HOME/sqlplus/admin/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 "sys/knl_test7 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 ondrop 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
1. 查找数据库中是否有该角色
SQL> select * from dba_roles where role='PLUSTRACE'; no rows selected
2.建立角色 (使用sys用户)
SQL> @?/sqlplus/admin/plustrce.sqlSQL> SQL> drop role plustrace;drop role plustrace *ERROR at line 1:ORA-01919: role 'PLUSTRACE' does not existSQL> create role plustrace;Role created.SQL> 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> SQL> set echo off
3.查询数据库
SQL> select * from dba_roles where role='PLUSTRACE';ROLE PASSWORD AUTHENTICAT------------------------------ -------- -----------PLUSTRACE NONONE
4.授予操作用户改权限
SQL> grant plustrace to hr;Grant succeeded.
5.使用hr用户测试是否成功
SQL> conn hr/hrConnected.SQL> SQL> set autotrace on
0 0
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled SP2-0611: Error enabl
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- 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
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled 报错处理
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier.Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- plsql(autotrace)-SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enable
- SQL> set autotrace traceonly SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is
- JQuery的Ajax跨域请求的解决方案
- DDR3设计总结
- C++虚函数
- Kill the monster
- Oracle导出表(即DMP文件)的两种方法
- SP2-0618: Cannot find the Session Identifier.Check PLUSTRACE role is enabled
- iOS--Animation总结
- orb-slam的安装/配置/运行
- ListView局部刷新
- 设计模式学习7——适配器模式
- 关于登陆时被截取用户密码的一点想法(出自新手,勿喷)
- 第十二周改成多文件程序
- 基础练习 数列特征
- 18大经典数据挖掘算法小结