Running Explain Plan in Toad [message #318547] |
Wed, 07 May 2008 02:47 |
sonikumari
Messages: 74 Registered: May 2006 Location: Mumbai
|
Member |
|
|
Hi,
I am first time trying to run explain plan.
I run it on sql prompt and it only gave the message EXPLAINED. I was not able to see the details.
I tried in TOAD version 7.5.2. It said run TOADPERP.sql.
I did that too.
Now when I am running explain plan for a selected sql, it only shows the Explain Plan window with no output but only 'TSMSql' written there in second window.
Please advice as how to get the output from explain plan.
Thanks,
Soni
|
|
|
|
Re: Running Explain Plan in Toad [message #318576 is a reply to message #318556] |
Wed, 07 May 2008 03:35 |
sonikumari
Messages: 74 Registered: May 2006 Location: Mumbai
|
Member |
|
|
Hi,
I did that too but it gives the below error.
SQL> select * from table(dbms_xplan.display);
select * from table(dbms_xplan.display)
*
ERROR at line 1:
ORA-00904: invalid column name
Do I need some previlege...if yes then what.
Or does it means that the package DBMS_XPLAN is not getting executed. I have tried running this using system/manager as well as scott/tiger..... but it didn't.
I looked into the folder C:\oracle\ora90\rdbms\admin for the package $ORACLE_HOME/rdbms/admin/dbmsxpln.sql but its not in that folder.
I do not know why its not there ..... Can anyone send me the package dbmsxpln.sql present in Oracle 9i.
I will run it and then try to run Explain Plan.
Thanks in advance,
Soni
[Updated on: Wed, 07 May 2008 04:27] Report message to a moderator
|
|
|
|
|
Re: Running Explain Plan in Toad [message #318599 is a reply to message #318547] |
Wed, 07 May 2008 04:41 |
msmallya
Messages: 66 Registered: March 2008 Location: AHMEDABAD, GUJARAT
|
Member |
|
|
First confirm you are getting the explain plan output at
SQL*Plus Prompt.
SQL> set autotr ( here you can press return to see the syntax)
sql>set autotrace on explain
sql>select sysdate from dual;
You need to create plan_table to store explain plan (utlxplan.sql)
explain plan set statement_id='XXX' for
select sysdate from dual;
Then you can acess plan_table for statement_id='XXX' or oracle supplied utlxplp.sql
Regards,
MSMallya
[Updated on: Wed, 07 May 2008 04:55] Report message to a moderator
|
|
|
|
|
|