环境:Oracle 10g,11g.

现象:在一次迁移测试中,发现有这样的角色赋权会报错不存在:

SYS@orcl> grant PLUSTRACE to jingyu;
grant PLUSTRACE to jingyu
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist

查询发现这个角色是需要手工执行脚本创建,直接执行Oracle自带的SQL脚本@?/sqlplus/admin/plustrce.sql即可:

SYS@orcl> @?/sqlplus/admin/plustrce.sql
SYS@orcl>
SYS@orcl> drop role plustrace;
drop role plustrace
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist SYS@orcl> create role plustrace; Role created. SYS@orcl>
SYS@orcl> grant select on v_$sesstat to plustrace; Grant succeeded. SYS@orcl> grant select on v_$statname to plustrace; Grant succeeded. SYS@orcl> grant select on v_$mystat to plustrace; Grant succeeded. SYS@orcl> grant plustrace to dba with admin option; Grant succeeded. SYS@orcl>
SYS@orcl> set echo off
SYS@orcl>

可以看到这个角色就是封装了对v_$sesstat,v_$statname,v_$mystat这几个视图的查询权限。

执行以后就可以直接赋予用户PLUSTRACE的角色了:

SYS@orcl> grant PLUSTRACE to jingyu;

Grant succeeded.

ORA-01919: role 'PLUSTRACE' does not exist的更多相关文章

  1. 诊断:ORA-01919: role ‘PLUSTRACE’ does not exist

    如下错误 SQL> grant plustrace to scott; grant plustrace to scott * ERROR at line 1: ORA-01919: role ' ...

  2. ORA-01919: role 'OLAPI_TRACE_USER' does not exist

    我在用数据泵导入数据的时候报的错 TEST_USER1@ORCL> conn / as sysdbaSYS@ORCL> grant plustrace to TEST_USER1; gra ...

  3. postgresql 使用pg_restore时显示role "root" does not exist的解决办法

    在docker里恢复bakcup格式的数据库,结果提示role "root" does not exist 解决方法: 切换用户: su - postgres 然后再次运行命令: ...

  4. ORA-01917: user or role 'PDB_DBA' does not exist

    在使用seed PDB创建新的PDB的时候,报了以下错误提示: SQL> create pluggable database pdb2 admin user admin1 identified ...

  5. psql: FATAL: role “postgres” does not exist

    I'm a postgres novice. I installed the postgres.app for mac. I was playing around with the psql comm ...

  6. psql: FATAL: role “postgres” does not exist 解决方案

    当时想做的事情,是运行一个创建数据库的脚本.找到的解决方案差不多和下面这个链接相同. http://stackoverflow.com/questions/15301826/psql-fatal-ro ...

  7. role 'PLUSTRACE' does not exist

    I have created a new user named watson and granted the related priviledges as following: SQL> cre ...

  8. 【小错误】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 ...

  9. 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 ...

随机推荐

  1. UDP,TCP的套接字编程的Python实现

    UDP,TCP的套接字编程的Python实现 套接字:连接应用层和运输层,应用层的网络应用程序使用IP地址+端口号来标识自己,然后通过套接字调用运输层为其服务,网络应用程序只能指定自己要使用的网络类型 ...

  2. tensorflow一些常用函数的使用注意

    tf.abs() 求tensor中数据的绝对值 tf.sign() 每一个数据都执行sigmod函数,得到对应的数值 tf.reduce_sum() 对不同维度数据求和.注意:1:求和每一行 0:求和 ...

  3. 闭区间套定理(Nested intervals theorem)讲解1

    ① ②这里用到了极限与不等关系 ③如果a≠b,那么便不会有$\lim _{n\rightarrow \infty }\left| I_n \right| =0$ ④如果还存在一点c在 内,那么同样也不 ...

  4. 苹果审核被拒,Guideline 1.1.6 - Safety - Objectionable Content;Guideline 3.1.1 - Business - Payments - In-App Purchase

    Guideline 1.1.6 - Safety - Objectionable Content Thank you for your resubmission. We noticed that yo ...

  5. 查找->动态查找表->平衡二叉树

    文字描述 平衡二叉树(Balanced Binary Tree或Height-Balanced Tree) 因为是俄罗斯数学家G.M.Adel’son-Vel’skii和E.M.Landis在1962 ...

  6. python循环字符转换

    pyhon函数传参的时候穿的是引用,而不是实际值,这样可以节省内存 变量名要求:最好是以字母下划线作为变量名,不能和py关键字重复 import getpass提供了平台无关的在命令行下输入密码的方法 ...

  7. 洛谷P4247 序列操作 [清华集训] 线段树

    正解:线段树 解题报告: 传送门! 通过这题我get了一个神奇的,叫,线段树五问的东西hhhh 听起来有点中二但感觉真正做题的时候还是比较有用的,,,?感觉会让条理清晰很多呢,所以放一下QwQ →每个 ...

  8. 对web标准化(或网站重构)知道哪些相关的知识,简述几条你知道的Web标准?

    网页主要有三部分组成:结构(Structrue).表现(Presentation)和行为(Behavior).对应的网站标准也分为三方面: 1.结构化标准语言,主要包括XHTML和XML: 2.表现标 ...

  9. ubuntu上u-boot的编译

    1,下载u-boot 2,将Windows中的u-boot复制到ubuntu虚拟机中自定义目录并解压 3,进入该目录cd 4,安装dtc:sudo apt-get install device-tre ...

  10. 【托业】【新托业TOEIC新题型真题】学习笔记10-题库七-P7

    1.to request a review of information 要求审查资料 2.inform of 将…告知(某人); 3.flammable [ˈflæməbl]adj.易燃的,可燃的; ...