Oracle uses scott user setautotraceon to report an error SP2-0618, SP2-0611

Source: Internet
Author: User


Error reported by scott user set autotrace on
SCOTT @ TEST0422> set autotrace onSP2-0618:Cannot find the Session Identifier. CheckPLUSTRACERole is enabledSP2-0611: Error enabling STATISTICS reportSCOTT @ TEST0422> conn/as sysdbaConnected. SYS @ TEST0422>
SYS @ TEST0422> grant plustrace to scott; grant plustrace to scott * ERROR at line 1: ORA-01919: role 'plustrace 'does not exist

Elapsed: 00:00:00. 35 ####################################### ######################################## ######## 3SYS @ TEST0422>@ $ ORACLE_HOME/sqlplus/admin/plustrce. SQLSYS @ TEST0422> SYS @ TEST0422> drop role plustrace; drop role plustrace * ERROR at line 1: ORA-01919: role 'plustrace 'does not exist

Elapsed: 00:00:00. 42SYS @ TEST0422> create role plustrace;
Role created.
Elapsed: 00:00:00. 11SYS @ TEST0422> SYS @ TEST0422> grant select on v _ $ sesstat to plustrace;
Grant succeeded.
Elapsed: 00:00:00. 02SYS @ TEST0422> grant select on v _ $ statname to plustrace;
Grant succeeded.
Elapsed: 00:00:00. 02SYS @ TEST0422> grant select on v _ $ mystat to plustrace;
Grant succeeded.
Elapsed: 00:00:00. 02SYS @ TEST0422> grant plustrace to dba with admin option;
Grant succeeded.
Elapsed: 00:00:00. 03SYS @ TEST0422> SYS @ TEST0422> set echo offSYS @ TEST0422> grant plustrace to scott;
Grant succeeded.
Elapsed: 00:00:00. 03SYS @ TEST0422> conn scott/tigerConnected. SCOTT @ TEST0422> set autotrace onSCOTT @ TEST0422> select * from emp;
Empno ename job mgr hiredate sal comm deptno ---------- ----------- ---------- 7369 smith clerk 7902 17-DEC-80 800 20 7499 allen salesman 7698 1600 300 ward salesman 7521 7698 1250 jones manager 7839 02-APR-81 2975 20 7654 martin salesman 7698 28-SEP-81 1250 1400 30 7698 blake manager 7839 01-MAY-81 2850 30 7782 clark manager 7839 09-JUN-81 2450 10 7788 scott analyst 7566 19-APR-87 3000 20 7839 king president 17-NOV-81 5000 10 7844 turner salesman 7698 08-SEP-81 1500 0 30 7876 adams clerk 7788 23-MAY-87 1100 20
Empno ename job mgr hiredate sal comm deptno ---------- --------- ---------- ------------ ---------- 7900 james clerk 7698 03-DEC-81 950 30 7902 ford analyst 7566 ANALYST 3000 20 7934 miller clerk 7782 23-JAN-82 1300 10
14 rows selected.
Elapsed: 00:00:00. 05
Execution Plan ---------------------------------------------------------- Plan hash value: 3956160932
Role | Id | Operation | Name | Rows | Bytes | Cost (% CPU) | Time | percent | 0 | select statement | 14 | 1218 | 3 (0) | 00:00:01 | 1 | table access full | EMP | 14 | 1218 | 3 (0) | 00:00:01 | --------------------------------------------------------------------------
Note ------dynamic sampling used for this statement

Statistics defaults 0 recursive cballs 0 db block gets 8 consistent gets 0 physical reads 0 redo size 1363 bytes sent via SQL * Net to client 385 bytes received via SQL * Net from client 2 SQL * Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 14 rows processed
SCOTT @ TEST0422>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.