SP2-0618 SP2-0611 ORA-01919 开执行计划错误(oracle12c)

发布时间:2020-07-14 10:23:25 作者:adelazhu
来源:网络 阅读:854

SQL> SET AUTOTRACE ON
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn system/oracle
Connected.
SQL> grant PLUSTRACE to adela;
grant PLUSTRACE to adela
      *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist


解决:

drop role c##plustrace;
create role c##plustrace;
grant select on v_$sesstat to c##plustrace;
grant select on v_$statname to c##plustrace;
grant select on v_$mystat to c##plustrace;
grant c##plustrace to c##adela with admin option;

conn c##adela/oracle
set autotrace on

查看下效果

SQL> set line 100
SQL> select cname from c where cno in (select cno from sc where sno in (select sno from s where sname='adela'));

CNAME
--------------------
OS
C++
Java
DB


Execution Plan
----------------------------------------------------------
Plan hash value: 2310661688

--------------------------------------------------------------------------------------------
| Id  | Operation             | Name       | Rows  | Bytes | Cost (%CPU)| Time       |
--------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT         |           |     1 |    22 |     5   (0)| 00:00:01 |
|   1 |  NESTED LOOPS             |           |       |       |        |       |
|   2 |   NESTED LOOPS             |           |     1 |    22 |     5   (0)| 00:00:01 |
|   3 |    VIEW              | VW_NSO_1    |     2 |    10 |     4   (0)| 00:00:01 |
|   4 |     HASH UNIQUE          |           |     1 |    48 |        |       |
|   5 |      NESTED LOOPS         |           |     2 |    48 |     4   (0)| 00:00:01 |
|*  6 |       TABLE ACCESS FULL      | S       |     1 |    13 |     3   (0)| 00:00:01 |
|*  7 |       INDEX RANGE SCAN         | SC_PK       |     2 |    22 |     1   (0)| 00:00:01 |
|*  8 |    INDEX UNIQUE SCAN         | SYS_C009862 |     1 |       |     0   (0)| 00:00:01 |
|   9 |   TABLE ACCESS BY INDEX ROWID| C       |     1 |    17 |     1   (0)| 00:00:01 |
--------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   6 - filter("SNAME"='adela')
   7 - access("SNO"="SNO")
   8 - access("CNO"="CNO")

Note
-----
   - dynamic statistics used: dynamic sampling (level=2)
   - this is an adaptive plan


Statistics
----------------------------------------------------------
      0  recursive calls
      0  db block gets
     16  consistent gets
      0  physical reads
      0  redo size
    612  bytes sent via SQL*Net to client
    543  bytes received via SQL*Net from client
      2  SQL*Net roundtrips to/from client
      0  sorts (memory)
      0  sorts (disk)
      4  rows processed

ok!

推荐阅读:
  1. SCCM 2007 SP2 部署需求
  2. Oracle12C R2+RAC安装测试

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

oracle12c 执行计划 ora-

上一篇:php项目上线放在服务器的什么地方

下一篇:GNS3从零开始第七弹(使用GNS3模拟路由器静态路由功能)

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》