Wednesday, February 3, 2021

SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled

 SQL*Plus: Release 12.2.0.1.0 Production on Mon Dec 16 21:14:13 2019


Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Enter user-name: hr/hr
Last Successful login time: Wed Dec 18 2019 23:45:56 +06:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL>
SQL>
SQL>
SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> grand dba to PLUSTRACE;
SP2-0734: unknown command beginning "grand dba ..." - rest of line ignored.
SQL>
SQL>
SQL> grand  PLUSTRACE to hr;
SP2-0734: unknown command beginning "grand  PLU..." - rest of line ignored.
SQL>
SQL>
SQL> grant  PLUSTRACE to hr;
grant  PLUSTRACE to hr
       *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist


SQL> conn hr/hr
Connected.
SQL>
SQL>
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> @%oracle_home%\sqlplus\admin\plustrce.sql;
SQL>
SQL> drop role plustrace;
drop role plustrace
          *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist


SQL> create role plustrace;

Role created.

SQL>
SQL> grant select on v_$sesstat to plustrace;
grant select on v_$sesstat to plustrace
                *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> grant select on v_$statname to plustrace;
grant select on v_$statname to plustrace
                *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> grant select on v_$mystat to plustrace;
grant select on v_$mystat to plustrace
                *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> grant plustrace to dba with admin option;

Grant succeeded.

SQL>
SQL> set echo off
SQL> conn hr/hr
Connected.
SQL>
SQL>
SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL>
SQL>
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> grant plustrace  to hr;

Grant succeeded.

SQL> conn hr/hr
Connected.
SQL>
SQL>
SQL>
SQL> set autotrace traceonly
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> set autotrace trace
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL>
SQL>
SQL>
SQL>
SQL> set autotrace trace
SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL>
SQL>
SQL>
SQL> conn sys as sysdba
Enter password:
Connected.
SQL>
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 o
  2  grant plustrace to dba with admin o
  3
SQL>
SQL> grant plustrace to dba with admin option
  2  ;

Grant succeeded.

SQL> grant plustrace to hr;

Grant succeeded.

SQL> conn hr/hr@orcl122
Connected.
SQL>
SQL>
SQL>
SQL>
SQL> set autotrace trace
SQL>
SQL>
SQL> select user from dual;


Execution Plan
----------------------------------------------------------
Plan hash value: 1388734953

-----------------------------------------------------------------
| Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
-----------------------------------------------------------------
|   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
|   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
-----------------------------------------------------------------


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

SQL>

No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...