Sql>@?/sqlplus/admin/plustrce.sql
[Email protected] hey~j->drop role plustrace;
Role dropped.
[Email protected] hey~j->create role plustrace;
Role created.
[Email protected] hey~j->
[Email protected] Hey~j->grant Select on V_$sesstat to Plustrace;
Grant succeeded.
[Email protected] Hey~j->grant Select on V_$statname to Plustrace;
Grant succeeded.
[Email protected] Hey~j->grant Select on V_$mystat to Plustrace;
Grant succeeded.
[Email protected] hey~j->grant Plustrace to dba with admin option;
Grant succeeded.
[Email protected] hey~j->grant plustrace to HR;
Grant succeeded.
Sql>conn hr/hr
[Email protected]>set autotrace traceonly;
[Email protected]>select count (*) from T3 where id=1;
Execution Plan
----------------------------------------------------------
Plan Hash value:463314188
---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU) | Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 13 | 7 (0) | 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 13 | | |
|* 2 | TABLE ACCESS full| T3 | 1 | 13 | 7 (0) | 00:00:01 |
---------------------------------------------------------------------------
predicate information (identified by Operation ID):
---------------------------------------------------
2-filter ("ID" =1)
note
-----
-dynamic sampling used for this statement (level=2)
-SQL plan Baseline "sql_plan_ghfucv736fsc114fae16c" used for this statement
Statistics
----------------------------------------------------------
Recursive calls
0 db Block gets
Consistent
0 physical Reads
0 Redo Size
526 Bytes sent via sql*net to client
524 Bytes received via sql*net from client
2 sql*net roundtrips To/from Client
5 Sorts (memory)
0 Sorts (disk)
1 rows processed
"ORACLE" grants HR users view execution plan permissions