"Execute Explain Plan" button disabled

I'm using the 1.1.3 version of SQL Developer included in the Oracle 11g distribution for Windows.
After connecting to a database and executing a query, I am unable to view its execution plan because the explain plan button is greyed-out. The connected user has the PLAN_TABLE table in its schema.

Are all the buttons grayed out on the worksheet or just the explain plan button? If you look at your worksheet, is the drop list on the right hand side populated? i.e does it display your user connection? If not, select your connection in the drop kist and the icons will change from gray to available.
You say in your message that you upgraded to 1.1. I assume you did a fresh install in a new directory.
Regards
Sue

Similar Messages

  • Explain Plan is disabled - why?

    Hi
    I was using SqlDeveloper 1.0 and had no problems using the Explain Plan feature. Now I upgraded to 1.1 (did not migrate settings) and now the explain plan button is always greyed out. Am I missing something to enable the explain plan feature?
    Thanks

    Are all the buttons grayed out on the worksheet or just the explain plan button? If you look at your worksheet, is the drop list on the right hand side populated? i.e does it display your user connection? If not, select your connection in the drop kist and the icons will change from gray to available.
    You say in your message that you upgraded to 1.1. I assume you did a fresh install in a new directory.
    Regards
    Sue

  • EXPLAIN PLAN option disabled

    Hi,
    When I take an Explain Plan using TKPROF it gives the following error:
    Error in CREATE TABLE of EXPLAIN PLAN table: APPS.prof$plan_table
    ORA-00955: name is already used by an existing object
    parse error offset: 18
    EXPLAIN PLAN option disabled.
    And the Explain Plan is snot displayed in the o/p file for all the queries.
    Can any one help me on this.
    Thanks,
    Kiran

    Hi kiran
    When I take an Explain Plan using TKPROF it gives the following error:
    Error in CREATE TABLE of EXPLAIN PLAN table: APPS.prof$plan_table
    ORA-00955: name is already used by an existing object
    parse error offset: 18
    EXPLAIN PLAN option disabled.
    ********************************************************************************What is your Db verssion and EBS? What is your kprof syntax. By the way please check those doc adn see its helpful:
    Run Adadmin To Recreate Grants And Synonyms ORA-20000 ORA-00955 In Synonyms Loop:create_synonym(GL,PLAN_TABLE,APPS,PLAN_TABLE) [ID 437714.1]
    TKPROF With Explain Fails With ORA-00903 invalid table name [ID 257294.1]
    OERR: ORA 955 is already used by an existing object [ID 18549.1]
    Also check:
    Re: TKPROF and Explain Plan
    Regard
    Helios

  • Unable to Execute Explain Plan for the selected SQL

    When working with several SQL statements in one SQL Worksheet you execute the specific statement by selecting it and pressing F9.
    The same is not possible for the explain plan though.
    If you select the first SQL statement and press F6, the explain plan is executed correctly. If you try the same for any other statement, all you get is 'No SQL statement entered.' on the status bar.
    Maciej

    It is available.
    Type this in.
    create table xx (yy number(10));
    create table zz (aa number(10));
    select * from xx;
    select * from zz;Run all these statements by pressing f5.
    Place the cursor on 'select * from xx;'.
    Press f6 gives you a plan.
    Place the cursor on 'select * from zz;'
    press f6 gives you a different plan.
    The problem seems to be that F6 is still suffering from a statement selection bug which is already fixed for f9. That is selecting a whole statement results in failure to recognise a statement and the 'No statement entered' message.

  • Invalid column name when executing explain plan

    SQL Developer version 4.0, SQL Worksheet, Windows 2000, Database 9.2.0.6.
    When attempted to run a explain plan on a simple two table join query, it generates error invalid column name. Removed aliases and simplify query to one table row count, and still get the same error. Even tried the schema owner and got the same error.
    I decided to check the explain plan table and found out that it was from an older version. Recreated the explain plan table and was able to run the explain plan.
    I'm just posting this in the event somebody else runs into the same problem.

    This was fixed in the 4.1 or 1215 build. Please update by downloading or check for updates.
    -thanks
    kris

  • Exporting the execute explain plan

    Hi-
    Is there a way to export the explain plan (in a pretty print format) from SQL Developer 1.0.0 - copying and pasting doesn't work. For large plans it is almost un-readable.
    Thanks in Advance.

    We have a Explain Plan print bug in the development process for 1.1
    Sue

  • Explain plan not working

    When I run the explain plan by pressing F6 or the execute explain plan button I get the message "Failed to query plan_table" "invalid column name".
    However I can do a select * from plan_table
    I'm using version 1.5.4 with the latest patch set.
    Any ideas?

    Getting an invalid column name when performing an explain plan suggests that you have an old plan table structure, compared to what SQL Developer is expecting for your DB version. This can easily happen where your DB has been upgrade without keeping the plan table up to date.
    Do you get any "old plan table" messages if you execute the "select * from table(dbms_xplan.display_cursor);"?
    theFurryOne

  • How enable the explain plan in JDeveloper?

    Can you tell me how to get explain plan in JDeveloper?
    Thanks in advance.

    If you are using jdev 11 just open a sql work sheet, type in your statement or query and hit F6 (Execute Explain Plan) or the third button from the right in the work sheet toolbar.
    Timo

  • Is plan_table necessary for an explain plan?

    Hi, I've noticed that an explain plan for a query can be obtained by setting autotrace on. However, when I get a result from the autotrace, it shows no records in the plan_table table. I just want to check with others to make sure it's clear that a plan_table table isn't necessary to obtain an explain plan for a query. I've also noticed that when I hit the explain plan button in sql developer, there's no records in the plan_table table.

    Girish Sharma wrote:
    arizona9952 wrote:
    Hi, I've noticed that an explain plan for a query can be obtained by setting autotrace on. However, when I get a result from the autotrace, it shows no records in the plan_table table. I just want to check with others to make sure it's clear that a plan_table table isn't necessary to obtain an explain plan for a query. I've also noticed that when I hit the explain plan button in sql developer, there's no records in the plan_table table.What is your sql developer version ? If it is 3.0 then sql developer rollbacks the rows after fetching the plan for display. So you must rely on the Autotrace or Explain Plan result tabs.
    Similar discussion in below thread:
    Choose specific plan_table in SQL Developer 2+?
    Regards
    Girish SharmaThanks Girish. I'm running SQL developer version 3.1, so that explains why the plan_table table shows empty after I run an explain plan in SQL developer.

  • Verbose EXPLAIN PLAN output when asking for explain plan on simple SQL

    Hello. In a nutshell I have two issues: first, inability to execute EXPLAIN PLAN via SET AUTOTRACE ON EXPLAIN, and second, extremely verbose output when I log on as SYSDBA to circumvent the first issue.
    So, issue number one:
    I am trying to get an EXPLAIN PLAN via SET AUTOTRACE ON EXPLAIN for a simple SQL query:
      1   select decode(rownum,1,'JAN', 2,'FEB',3,'MAR',4,'APR',5,'MAY',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OCT',11,'NOV',12,'DEC')
      2* from all_objects where rownum<13
    HR@XE> /
    DEC
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    12 rows selected.
    HR@XE> set autotrace on explain
    HR@XE> /
    DEC
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    12 rows selected.
    Execution Plan
    ERROR:
    ORA-01039: insufficient privileges on underlying objects of the viewSo, first question, why am I getting this error? ALL_OBJECTS should be available to everybody, no?
    So to circumvent this I log on as sysdba and get the second issue: the following extremely verbose output
    HR@XE> connect / as sysdba
    Connected.
    SYS@XE>  select decode(rownum,1,'JAN', 2,'FEB',3,'MAR',4,'APR',5,'MAY',6,'JUN',7,'JUL',8,'AUG',9,'SEP',10,'OCT',11,'NOV',12,'DEC')
      2  from all_objects where rownum<13;
    DEC
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    12 rows selected.
    SYS@XE> set autotrace on explain
    SYS@XE> /
    DEC
    JAN
    FEB
    MAR
    APR
    MAY
    JUN
    JUL
    AUG
    SEP
    OCT
    NOV
    DEC
    12 rows selected.
    Execution Plan
    Plan hash value: 1291336664
    | Id  | Operation                          | Name                    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                   |                         |    12 |  3240 |     5  (20)| 00:00:01 |
    |*  1 |  COUNT STOPKEY                     |                         |       |       |            |       |
    |*  2 |   FILTER                           |                         |       |       |            |       |
    |*  3 |    HASH JOIN                       |                         |    32 |  8640 |     5  (20)| 00:00:01 |
    |   4 |     INDEX FULL SCAN                | I_USER2                 |    49 |  1078 |     1   (0)| 00:00:01 |
    |*  5 |     HASH JOIN                      |                         |    32 |  5248 |     4  (25)| 00:00:01 |
    |   6 |      INDEX FULL SCAN               | I_USER2                 |    49 |   196 |     1   (0)| 00:00:01 |
    |*  7 |      TABLE ACCESS FULL             | OBJ$                    |    33 |  2640 |     2   (0)| 00:00:01 |
    |*  8 |    TABLE ACCESS BY INDEX ROWID     | IND$                    |     1 |     8 |     2   (0)| 00:00:01 |
    |*  9 |     INDEX UNIQUE SCAN              | I_IND1                  |     1 |       |     1   (0)| 00:00:01 |
    |* 10 |    HASH JOIN                       |                         |     1 |    24 |     3  (34)| 00:00:01 |
    |* 11 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |    11 |     2   (0)| 00:00:01 |
    |  12 |     FIXED TABLE FULL               | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 13 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 14 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  15 |    NESTED LOOPS                    |                         |       |       |            |       |
    |  16 |     NESTED LOOPS                   |                         |     1 |    73 |     6   (0)| 00:00:01 |
    |  17 |      NESTED LOOPS                  |                         |     1 |    63 |     4   (0)| 00:00:01 |
    |  18 |       NESTED LOOPS                 |                         |     1 |    52 |     3   (0)| 00:00:01 |
    |  19 |        MERGE JOIN CARTESIAN        |                         |     1 |    48 |     2   (0)| 00:00:01 |
    |* 20 |         INDEX RANGE SCAN           | I_OBJ5                  |     1 |    35 |     2   (0)| 00:00:01 |
    |  21 |         BUFFER SORT                |                         |   100 |  1300 |     0   (0)| 00:00:01 |
    |  22 |          FIXED TABLE FULL          | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 23 |        INDEX RANGE SCAN            | I_USER2                 |     1 |     4 |     1   (0)| 00:00:01 |
    |* 24 |       INDEX RANGE SCAN             | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 25 |      INDEX RANGE SCAN              | I_DEPENDENCY1           |     4 |       |     1   (0)| 00:00:01 |
    |* 26 |     TABLE ACCESS BY INDEX ROWID    | DEPENDENCY$             |     1 |    10 |     2   (0)| 00:00:01 |
    |* 27 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 28 |    HASH JOIN                       |                         |     1 |    24 |     3  (34)| 00:00:01 |
    |* 29 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |    11 |     2   (0)| 00:00:01 |
    |  30 |     FIXED TABLE FULL               | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 31 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  32 |    NESTED LOOPS                    |                         |     2 |    48 |     2   (0)| 00:00:01 |
    |* 33 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |    11 |     2   (0)| 00:00:01 |
    |* 34 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |  35 |    NESTED LOOPS                    |                         |     1 |    38 |     2   (0)| 00:00:01 |
    |  36 |     NESTED LOOPS                   |                         |     1 |    25 |     2   (0)| 00:00:01 |
    |* 37 |      TABLE ACCESS BY INDEX ROWID   | TRIGGER$                |     1 |    14 |     1   (0)| 00:00:01 |
    |* 38 |       INDEX UNIQUE SCAN            | I_TRIGGER2              |     1 |       |     0   (0)| 00:00:01 |
    |* 39 |      INDEX RANGE SCAN              | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 40 |     FIXED TABLE FULL               | X$KZSRO                 |     1 |    13 |     0   (0)| 00:00:01 |
    |* 41 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  42 |    NESTED LOOPS                    |                         |       |       |            |       |
    |  43 |     NESTED LOOPS                   |                         |     1 |    73 |     6   (0)| 00:00:01 |
    |  44 |      NESTED LOOPS                  |                         |     1 |    63 |     4   (0)| 00:00:01 |
    |  45 |       NESTED LOOPS                 |                         |     1 |    52 |     3   (0)| 00:00:01 |
    |  46 |        MERGE JOIN CARTESIAN        |                         |     1 |    48 |     2   (0)| 00:00:01 |
    |* 47 |         INDEX RANGE SCAN           | I_OBJ5                  |     1 |    35 |     2   (0)| 00:00:01 |
    |  48 |         BUFFER SORT                |                         |   100 |  1300 |     0   (0)| 00:00:01 |
    |  49 |          FIXED TABLE FULL          | X$KZSRO                 |   100 |  1300 |     0   (0)| 00:00:01 |
    |* 50 |        INDEX RANGE SCAN            | I_USER2                 |     1 |     4 |     1   (0)| 00:00:01 |
    |* 51 |       INDEX RANGE SCAN             | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 52 |      INDEX RANGE SCAN              | I_DEPENDENCY1           |     4 |       |     1   (0)| 00:00:01 |
    |* 53 |     TABLE ACCESS BY INDEX ROWID    | DEPENDENCY$             |     1 |    10 |     2   (0)| 00:00:01 |
    |* 54 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 55 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 56 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  57 |    NESTED LOOPS                    |                         |     2 |    68 |     2   (0)| 00:00:01 |
    |  58 |     NESTED LOOPS                   |                         |     1 |    21 |     2   (0)| 00:00:01 |
    |  59 |      TABLE ACCESS BY INDEX ROWID   | TABPART$                |     1 |    10 |     1   (0)| 00:00:01 |
    |* 60 |       INDEX UNIQUE SCAN            | I_TABPART_OBJ$          |     1 |       |     0   (0)| 00:00:01 |
    |* 61 |      INDEX RANGE SCAN              | I_OBJAUTH1              |     1 |    11 |     1   (0)| 00:00:01 |
    |* 62 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |* 63 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 64 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 65 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 66 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 67 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 68 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 69 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 70 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 71 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 72 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 73 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 74 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  75 |    VIEW                            |                         |     1 |    13 |     2   (0)| 00:00:01 |
    |  76 |     FAST DUAL                      |                         |     1 |       |     2   (0)| 00:00:01 |
    |* 77 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 78 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 79 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 80 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 81 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |* 82 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  83 |    NESTED LOOPS                    |                         |     2 |    42 |     2   (0)| 00:00:01 |
    |* 84 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |     8 |     2   (0)| 00:00:01 |
    |* 85 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |* 86 |    FIXED TABLE FULL                | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  87 |    NESTED LOOPS                    |                         |     2 |    42 |     2   (0)| 00:00:01 |
    |* 88 |     INDEX RANGE SCAN               | I_OBJAUTH1              |     1 |     8 |     2   (0)| 00:00:01 |
    |* 89 |     FIXED TABLE FULL               | X$KZSRO                 |     2 |    26 |     0   (0)| 00:00:01 |
    |* 90 |      FIXED TABLE FULL              | X$KZSPR                 |     1 |    26 |     0   (0)| 00:00:01 |
    |  91 |    VIEW                            |                         |     1 |    16 |     1   (0)| 00:00:01 |
    |  92 |     SORT GROUP BY                  |                         |     1 |    86 |     1   (0)| 00:00:01 |
    |  93 |      NESTED LOOPS                  |                         |     1 |    86 |     1   (0)| 00:00:01 |
    |  94 |       MERGE JOIN CARTESIAN         |                         |     1 |    78 |     0   (0)| 00:00:01 |
    |  95 |        NESTED LOOPS                |                         |     1 |    65 |     0   (0)| 00:00:01 |
    |* 96 |         INDEX UNIQUE SCAN          | I_OLAP_CUBES$           |     1 |    13 |     0   (0)| 00:00:01 |
    |* 97 |         TABLE ACCESS BY INDEX ROWID| OLAP_DIMENSIONALITY$    |     1 |    52 |     0   (0)| 00:00:01 |
    |* 98 |          INDEX RANGE SCAN          | I_OLAP_DIMENSIONALITY$  |     1 |       |     0   (0)| 00:00:01 |
    |  99 |        BUFFER SORT                 |                         |     1 |    13 |     0   (0)| 00:00:01 |
    | 100 |         INDEX FULL SCAN            | I_OLAP_CUBE_DIMENSIONS$ |     1 |    13 |     0   (0)| 00:00:01 |
    |*101 |       INDEX RANGE SCAN             | I_OBJ1                  |     1 |     8 |     1   (0)| 00:00:01 |
    | 102 |    NESTED LOOPS                    |                         |     1 |    30 |     2   (0)| 00:00:01 |
    |*103 |     INDEX SKIP SCAN                | I_USER2                 |     1 |    20 |     1   (0)| 00:00:01 |
    |*104 |     INDEX RANGE SCAN               | I_OBJ4                  |     1 |    10 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<13)
       2 - filter(("O"."TYPE#"<>1 AND "O"."TYPE#"<>10 OR "O"."TYPE#"=1 AND  (SELECT 1 FROM "SYS"."IND$"
                  "I" WHERE "I"."OBJ#"=:B1 AND ("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR
                  "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9))=1) AND (("O"."SPARE3"=USERENV('SCHEMAID') OR
                  "O"."SPARE3"=1) OR "O"."TYPE#"=13 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OA",SYS."X$KZSRO"
                  "X$KZSRO" WHERE "OA"."GRANTEE#"="KZSROROL" AND "OA"."OBJ#"=:B2 AND ("OA"."PRIVILEGE#"=12 OR
                  "OA"."PRIVILEGE#"=26)) OR  EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE
                  "INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-184) OR (-"KZSPRPRV")=(-181) OR
                  (-"KZSPRPRV")=(-241)))) OR ("O"."TYPE#"=1 OR "O"."TYPE#"=2 OR "O"."TYPE#"=3 OR "O"."TYPE#"=4 OR
                  "O"."TYPE#"=5 OR "O"."TYPE#"=19 OR "O"."TYPE#"=20 OR "O"."TYPE#"=34 OR "O"."TYPE#"=35) AND  EXISTS
                  (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE "INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-45)
                  OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50))) OR
                  "O"."TYPE#"=11 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OA","SYS"."DEPENDENCY$"
                  "DEP",SYS."USER$" "U",SYS."OBJ$" "O",SYS."X$KZSRO" "X$KZSRO" WHERE "O"."NAME"=:B3 AND
                  "O"."SPARE3"=:B4 AND "O"."TYPE#"=9 AND "O"."TYPE#"<>88 AND "O"."OWNER#"="U"."USER#" AND
                  "DEP"."D_OBJ#"=:B5 AND "DEP"."P_OBJ#"="O"."OBJ#" AND "OA"."OBJ#"="O"."OBJ#" AND "OA"."PRIVILEGE#"=26
                  AND "OA"."GRANTEE#"="KZSROROL") OR  EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE
                  ((-"KZSPRPRV")=(-141) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))) OR ("O"."TYPE#"=7
                  OR "O"."TYPE#"=8 OR "O"."TYPE#"=9 OR "O"."TYPE#"=28 OR "O"."TYPE#"=29 OR "O"."TYPE#"=30 OR
                  "O"."TYPE#"=56) AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OA",SYS."X$KZSRO" "X$KZSRO" WHERE
                  "OA"."GRANTEE#"="KZSROROL" AND "OA"."OBJ#"=:B6 AND ("OA"."PRIVILEGE#"=12 OR "OA"."PRIVILEGE#"=26)) OR
                   EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE "INST_ID"=USERENV('INSTANCE') AND
                  ((-"KZSPRPRV")=(-144) OR (-"KZSPRPRV")=(-141) OR (-"KZSPRPRV")=(-241)))) OR "O"."TYPE#"<>14 AND
                  "O"."TYPE#"<>28 AND "O"."TYPE#"<>29 AND "O"."TYPE#"<>30 AND "O"."TYPE#"<>56 AND "O"."TYPE#"<>93 AND
                  "O"."TYPE#"<>7 AND "O"."TYPE#"<>8 AND "O"."TYPE#"<>9 AND "O"."TYPE#"<>11 AND "O"."TYPE#"<>12 AND
                  "O"."TYPE#"<>13 AND  EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$" "OBJAUTH$",SYS."X$KZSRO" "X$KZSRO" WHERE
                  "GRANTEE#"="KZSROROL" AND "OBJ#"=:B7 AND ("PRIVILEGE#"=3 OR "PRIVILEGE#"=6 OR "PRIVILEGE#"=7 OR
                  "PRIVILEGE#"=9 OR "PRIVILEGE#"=10 OR "PRIVILEGE#"=11 OR "PRIVILEGE#"=12 OR "PRIVILEGE#"=16 OR
                  "PRIVILEGE#"=17 OR "PRIVILEGE#"=18)) OR "O"."TYPE#"=12 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$"
                  "OA","SYS"."TRIGGER$" "T",SYS."X$KZSRO" "X$KZSRO" WHERE "OA"."GRANTEE#"="KZSROROL" AND "T"."OBJ#"=:B8
                  AND BITAND("T"."PROPERTY",24)=0 AND "OA"."OBJ#"="T"."BASEOBJECT" AND "OA"."PRIVILEGE#"=26) OR  EXISTS
                  (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE ((-"KZSPRPRV")=(-152) OR (-"KZSPRPRV")=(-241)) AND
                  "INST_ID"=USERENV('INSTANCE'))) OR "O"."TYPE#"=14 AND ( EXISTS (SELECT 0 FROM "SYS"."OBJAUTH$"
                  "OA","SYS"."DEPENDENCY$" "DEP",SYS."USER$" "U",SYS."OBJ$" "O",SYS."X$KZSRO" "X$KZSRO" WHERE
                  "O"."NAME"=:B9 AND "O"."SPARE3"=:B10 AND "O"."TYPE#"=13 AND "O"."TYPE#"<>88 AND
                  "O"."OWNER#"="U"."USER#" AND "DEP"."D_OBJ#"=:B11 AND "DEP"."P_OBJ#"="O"."OBJ#" AND
                  "OA"."OBJ#"="O"."OBJ#" AND "OA"."PRIVILEGE#"=26 AND "OA"."GRANTEE#"="KZSROROL") OR  EXISTS (SELECT 0
                  FROM SYS."X$KZSPR" "X$KZSPR" WHERE ((-"KZSPRPRV")=(-181) OR (-"KZSPRPRV")=(-241)) AND
                  "INST_ID"=USERENV('INSTANCE'))) OR ("O"."TYPE#"=66 OR "O"."TYPE#"=100) AND  EXISTS (SELECT 0 FROM
                  SYS."X$KZSPR" "X$KZSPR" WHERE (-"KZSPRPRV")=(-265) AND "INST_ID"=USERENV('INSTANCE')) OR
                  ("O"."TYPE#"=67 OR "O"."TYPE#"=79) AND  EXISTS (SELECT 0 FROM SYS."X$KZSPR" "X$KZSPR" WHERE
                  ((-"KZSPRPRV")=(-265) OR (-"KZSPRPRV")=(-266)) AND "INST_ID"=USERENV('INSTANCE')) OR "O"."TYPE#"=19
                  AND  EXISTS (SELECT 0 FROM SYS."TABPART$" "TABPART$","SYS"."OBJAUTH$" "OBJAUTH$",SYS."X$KZSRO"
                  "X$KZSRO" WHERE "GRANTEE#"="KZSROROL" AND "BO#"="OBJ#" A)
       3 - access("O"."OWNER#"="U"."USER#")
       5 - access("O"."SPARE3"="U"."USER#")
       7 - filter("O"."NAME"<>'_NEXT_OBJECT' AND "O"."NAME"<>'_default_auditing_options_' AND
                  BITAND("O"."FLAGS",128)=0 AND "O"."LINKNAME" IS NULL)
       8 - filter("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR
                  "I"."TYPE#"=7 OR "I"."TYPE#"=9)
       9 - access("I"."OBJ#"=:B1)
      10 - access("OA"."GRANTEE#"="KZSROROL")
      11 - access("OA"."OBJ#"=:B1)
           filter("OA"."PRIVILEGE#"=12 OR "OA"."PRIVILEGE#"=26)
      13 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-184) OR (-"KZSPRPRV")=(-181) OR
                  (-"KZSPRPRV")=(-241)))
      14 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR
                  (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)))
      20 - access("O"."SPARE3"=:B1 AND "O"."NAME"=:B2 AND "O"."TYPE#"=9)
           filter("O"."TYPE#"=9 AND "O"."TYPE#"<>88)
      23 - access("O"."OWNER#"="U"."USER#")
      24 - access("OA"."OBJ#"="O"."OBJ#" AND "OA"."GRANTEE#"="KZSROROL" AND "OA"."PRIVILEGE#"=26)
           filter("OA"."PRIVILEGE#"=26 AND "OA"."GRANTEE#"="KZSROROL")
      25 - access("DEP"."D_OBJ#"=:B1)
      26 - filter("DEP"."P_OBJ#"="O"."OBJ#")
      27 - filter(((-"KZSPRPRV")=(-141) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))
      28 - access("OA"."GRANTEE#"="KZSROROL")
      29 - access("OA"."OBJ#"=:B1)
           filter("OA"."PRIVILEGE#"=12 OR "OA"."PRIVILEGE#"=26)
      31 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-144) OR (-"KZSPRPRV")=(-141) OR
                  (-"KZSPRPRV")=(-241)))
      33 - access("OBJ#"=:B1)
           filter("PRIVILEGE#"=3 OR "PRIVILEGE#"=6 OR "PRIVILEGE#"=7 OR "PRIVILEGE#"=9 OR "PRIVILEGE#"=10
                  OR "PRIVILEGE#"=11 OR "PRIVILEGE#"=12 OR "PRIVILEGE#"=16 OR "PRIVILEGE#"=17 OR "PRIVILEGE#"=18)
      34 - filter("GRANTEE#"="KZSROROL")
      37 - filter(BITAND("T"."PROPERTY",24)=0)
      38 - access("T"."OBJ#"=:B1)
      39 - access("OA"."OBJ#"="T"."BASEOBJECT" AND "OA"."PRIVILEGE#"=26)
           filter("OA"."PRIVILEGE#"=26)
      40 - filter("OA"."GRANTEE#"="KZSROROL")
      41 - filter(((-"KZSPRPRV")=(-152) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))
      47 - access("O"."SPARE3"=:B1 AND "O"."NAME"=:B2 AND "O"."TYPE#"=13)
           filter("O"."TYPE#"=13 AND "O"."TYPE#"<>88)
      50 - access("O"."OWNER#"="U"."USER#")
      51 - access("OA"."OBJ#"="O"."OBJ#" AND "OA"."GRANTEE#"="KZSROROL" AND "OA"."PRIVILEGE#"=26)
           filter("OA"."PRIVILEGE#"=26 AND "OA"."GRANTEE#"="KZSROROL")
      52 - access("DEP"."D_OBJ#"=:B1)
      53 - filter("DEP"."P_OBJ#"="O"."OBJ#")
      54 - filter(((-"KZSPRPRV")=(-181) OR (-"KZSPRPRV")=(-241)) AND "INST_ID"=USERENV('INSTANCE'))
      55 - filter((-"KZSPRPRV")=(-265) AND "INST_ID"=USERENV('INSTANCE'))
      56 - filter(((-"KZSPRPRV")=(-265) OR (-"KZSPRPRV")=(-266)) AND "INST_ID"=USERENV('INSTANCE'))
      60 - access("OBJ#"=:B1)
      61 - access("BO#"="OBJ#" AND "PRIVILEGE#"=9)
           filter("PRIVILEGE#"=9)
      62 - filter("GRANTEE#"="KZSROROL")
      63 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-189) OR (-"KZSPRPRV")=(-190) OR
                  (-"KZSPRPRV")=(-191) OR (-"KZSPRPRV")=(-192)))
      64 - filter((-"KZSPRPRV")=(-109) AND "INST_ID"=USERENV('INSTANCE'))
      65 - filter(((-"KZSPRPRV")=(-177) OR (-"KZSPRPRV")=(-178)) AND "INST_ID"=USERENV('INSTANCE'))
      66 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR
                  (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)))
      67 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-205) OR (-"KZSPRPRV")=(-206) OR
                  (-"KZSPRPRV")=(-207) OR (-"KZSPRPRV")=(-208)))
      68 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-200) OR (-"KZSPRPRV")=(-201) OR
                  (-"KZSPRPRV")=(-202) OR (-"KZSPRPRV")=(-203) OR (-"KZSPRPRV")=(-204)))
      69 - filter(((-"KZSPRPRV")=(-222) OR (-"KZSPRPRV")=(-223)) AND "INST_ID"=USERENV('INSTANCE'))
      70 - filter((-"KZSPRPRV")=12 AND "INST_ID"=USERENV('INSTANCE'))
      71 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-251) OR (-"KZSPRPRV")=(-252) OR
                  (-"KZSPRPRV")=(-253) OR (-"KZSPRPRV")=(-254)))
      72 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-258) OR (-"KZSPRPRV")=(-259) OR
                  (-"KZSPRPRV")=(-260) OR (-"KZSPRPRV")=(-261)))
      73 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-246) OR (-"KZSPRPRV")=(-247) OR
                  (-"KZSPRPRV")=(-248) OR (-"KZSPRPRV")=(-249)))
      74 - filter(((-"KZSPRPRV")=(-268) OR (-"KZSPRPRV")=(-267)) AND "INST_ID"=USERENV('INSTANCE'))
      77 - filter(((-"KZSPRPRV")=(-277) OR (-"KZSPRPRV")=(-278)) AND "INST_ID"=USERENV('INSTANCE'))
      78 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-292) OR (-"KZSPRPRV")=(-293) OR
                  (-"KZSPRPRV")=(-294)))
      79 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-282) OR (-"KZSPRPRV")=(-283) OR
                  (-"KZSPRPRV")=(-284) OR (-"KZSPRPRV")=(-285)))
      80 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-302) OR (-"KZSPRPRV")=(-303) OR
                  (-"KZSPRPRV")=(-304) OR (-"KZSPRPRV")=(-305) OR (-"KZSPRPRV")=(-306) OR (-"KZSPRPRV")=(-307)))
      81 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-315) OR (-"KZSPRPRV")=(-316) OR
                  (-"KZSPRPRV")=(-317) OR (-"KZSPRPRV")=(-318)))
      82 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-320) OR (-"KZSPRPRV")=(-321) OR
                  (-"KZSPRPRV")=(-322)))
      84 - access("OBJ#"=:B1)
      85 - filter("GRANTEE#"="KZSROROL")
      86 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-309) OR (-"KZSPRPRV")=(-310) OR
                  (-"KZSPRPRV")=(-311) OR (-"KZSPRPRV")=(-312) OR (-"KZSPRPRV")=(-313)))
      88 - access("OBJ#"=:B1)
      89 - filter("GRANTEE#"="KZSROROL")
      90 - filter("INST_ID"=USERENV('INSTANCE') AND ((-"KZSPRPRV")=(-302) OR (-"KZSPRPRV")=(-303) OR
                  (-"KZSPRPRV")=(-304) OR (-"KZSPRPRV")=(-305) OR (-"KZSPRPRV")=(-306) OR (-"KZSPRPRV")=(-307)))
      96 - access("C"."OBJ#"=:B1)
      97 - filter("DIML"."DIMENSION_TYPE"=11)
      98 - access("DIML"."DIMENSIONED_OBJECT_ID"=:B1 AND "DIML"."DIMENSIONED_OBJECT_TYPE"=1)
    101 - access("DIML"."DIMENSION_ID"="DO"."OBJ#")
           filter("DO"."OBJ#"="DIM"."OBJ#")
    103 - access("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
           filter("U2"."TYPE#"=2 AND "U2"."SPARE2"=TO_NUMBER(SYS_CONTEXT('userenv','current_edition_id')))
    104 - access("O2"."DATAOBJ#"=:B1 AND "O2"."TYPE#"=88 AND "O2"."OWNER#"="U2"."USER#")
    SYS@XE>Many thanks in advance.
    Jason

    Welcome to the forum!
    Whenever you post please provide your 4 digit Oracle Version (result of SELECT * FROM V$VERSION).
    >
    So, first question, why am I getting this error? ALL_OBJECTS should be available to everybody, no?
    >
    Your user probably does have access to ALL_OBJECTS. But you need to have dba privileges to access views base objects.
    The "ORA-01039: insufficient privileges on underlying objects of the view" message is telling you that the user does not have privileges to access the BASE OBJECTS that used to build the view. Access to those base objects is necessary to generate the plan you are trying to see.
    So to circumvent this I log on as sysdba and get the second issue: the following extremely verbose output
    >
    And that is because sysdba DOES have access to the base objects of the view. You asked for a plan and you got it. That verbose output IS the plan and all of those oddly named tables are being accessed to satisfy your query so are included in the plan.
    Do your query using DUAL or the SCOTT.EMP table and you won't get the error.

  • How to enable Explain plan in TOAD

    Hi,
    I am using toad version 8.6.1.Whenever i login as my userid and run a sql stmnt i am trying to get explain plan from toad explain plan button.But it's not showing anything some times it says insuffcient privileges.I created synonym called plan_table which is based on actual plan_table.But no luck.Can you pls help me how to enable explain plan in toad
    Thanks
    Anand

    Anand,
    in earlier versions of Toad you could use the notoad.sql or toadprep.sql to create the required tables.
    In your version it is probably already has been replaced by menu option Tools->Server Side Object Wizard.
    Toad does not use the plan_table - it creates it's own set of tables including the table for the explain plan.
    Mike

  • Explain plan privileges

    Hi,
    in order to use the explain plan feature inside the worksheet (sqldev 2.1, 15 Dec 09), sqldev requires the SELECT_CATALOG_ROLE and the SELECT ANY DICTIONARY privileges.
    Why?
    1. Even with only the classic CONNECT and RESOURCE roles granted, I can execute "explain plan for ..." and "select * from table(dbms_xplan.display);" and get the xplan.
    2. Don't you see the problems in persuading those hard core DBAs, that developers need xplan - and yes, they can read them???

    1. seems one of those bugs... there are more areas that need such privileges. DEV?
    2. was requested at the Exchange, but sadly rejected. You can request it again, but seen the scarce support on votes, it would just be rejected again.
    Regards,
    K.

  • How to decide explain plan is optimal?

    hi All,
    could you please tell me on what basis we can decide explain plan is optimal.
    Thanks,
    Santosh.

    <If possible I don't recommend using AUTOTRACE since it requires actual execution of a sql>
    Good observation. But it you want the statistics you have to run the statement anyway, and its easier than doing a trace and using TKPROF. You can also turn off query execution by using SET AUTOTRACE TRACEONLY EXPLAIN but if you get it wrong the query will still execute :)
    EXPLAIN PLAN is better when you want to be certain to just get a plan. Plus, the output from DBMS_XPLAN (9iR2 and later) is I feel easier to read.
    GUI tools like TOAD are great - if you can get them. My workstation is locked down and I can't load anything that requires registry changes; a TOAD installation failed last week. I have SQL*DEVELOPER but have to re-load the connection settings (they're stored in an HTML file) when I start it

  • Inaccurate EXPLAIN PLAN...!!!

    This is frightening... I've been working on a nasty query on a poorly designed data model and checking my work by hitting the Explain Plan button in SQLDeveloper. I was scratching my head over tons of hash joins and such, when all of a sudden I had a query with five tables showing an explain plan with only three!
    I'll try to post the screen shot if I can.
    Is there something that can cause this, and how can I fix it? Maybe the plan table is out of date?

    What's the status of the plan_table.
    A new 10gR2 database creates it as a GLOBAL TEMPORARY TABLE, so there shouldn't be any risk of tripping over any other sessions.
    Otherwise there's always the risk of two people (or less likely, one person and multiple sessions) doing an EXPLAIN at the same time and picking up the wrong one.
    If you don't have a GLOBAL TEMPORARY TABLE (and can't turn it into one), go the old-fashioned route and use EXPLAIN PLAN FOR STATEMENT make_up_an_id SELECT....
    And use that statement id when querying the explain plan

  • Efficient way to read through big explain plan and genterate html explain plan for sql id's executed in past

    Hi,
    I have a sql which is recently having a performance problems in Production. I have generated a explain plan for it trying to find out what it is doing but plan itself is close to 1000 lines. I want to check if there is any efficient way to go through big plan like this one and quickly find the damaging areas..
    2) I also wanted to know if there is way to generate explain plans in HTML format which executed in past and have entry in dba_hist_sqltext.
    3) I also have two sql_monitor reports which I want to compare. is there any efficient way to do it as well?
    Please share your thoughts!
    Thanks in advance!
    Regards,
    Suman-

    Hi,
    I suggest you can try running sql advisor on the query maybe something fruitful comes up
    http://www.oracle-base.com/articles/11g/sql-access-advisor-11gr1.php
    I am not sure about the explain plan being printed in html format but
    You may also want to try the sqlhistory.sql query from below page
    http://evdbt.com/scripts/
    I have used it many times to check on executions and explain plans which may have changed over the period
    I have faced it many times , the query picks up a bad explain plan and performs poorly

Maybe you are looking for