Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why is it impossibe to explain plan for virtual tables
On Thu, 17 Sep 1998 13:19:23 GMT, protasov_at_percombank.kiev.ua wrote:
>
>
>Hi All,
>
>Why is it impossibe to explain plan for queries
>with virtual tables. For example:
>
>explain plan set statement_id='1'
>for select * from sys.v_$session;
>
>I received error:
>
>ORA-01039: insufficient privileges on underlying objects
>of the view
>
>Connected user has DBA role.
AFAIK you can only explain the operations on V_$ views if you are connected under schema SYS. FYI, the execution plan for your select is:
SQL> connect sys
Enter password: *******
Connected.
SQL> set autotrace traceonly explain
SQL> select * from v_$session;
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 FIXED TABLE (FULL) OF 'X$KSUSE'
>Andrew Protasov
HTH,
--
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)