Sorry, typo there. I meant check the privileges of the specified user (IMEDW)
Main Topics
Browse All TopicsI ran trace on a job and then tkprofs.
But the explain plan component fails, it says
"Error in CREATE TABLE of EXPLAIN PLAN table: OPS$IMEDW.prof$plan_table
ORA-01031: insufficient privileges"
What is prof$plan table ?
the user ops$imedw has a plan_table, but I'm scratching my head on this prof$plan_table
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
sdstuber, you said:
>>
as a workaround, try NOT using the EXPLAIN option. It's sort of misleading anyway.
The "real" plan will already be in the tkprof output, The EXPLAIN option generates a new plan for each statement which may, or may not, be the same as what really ran.
<<
I don't understand -->"the 'real' plan will already be in the tkprof output . . . "
- in the output it says this:
Error in CREATE TABLE of EXPLAIN PLAN table: OPS$IMEDW.prof$plan_table
ORA-01031: insufficient privileges
EXPLAIN PLAN option disabled.
and the output is below in code snippet, hope the formatting sticks.
what I meant by "the real plan" is, the trace will contain the plan that was executed when the query was run
here's a simple example I just ran in a test database...
exec dbms_monitor.session_trace
select * from user_tables;
exit
then I tkprof'd the generated trace file
tkprof sds11_ora_3776.trc eetest.out (no explain or other options)
and here's an excerpt of that output
notice the plan (row source operations) is already in the output
sdstuber.
so are you saying the EXPLAIN PLAN that I am missing (due to the error in creating the prof$plan table) is just a simple "oh, here's how Oracle WILL handle this", while what your stats are showing is "here's how Oracle REALLY handled this" ?
if so, then I should skip all of my "options" ?, which are:
sort='(prsela,exeela,f
btw
good stuff, thanks
the sort options are handy, saves you from having to search for the query with the most executions or fetches.
It's only the explain option that requires reconnecting to the db. Your explanation is correct, with some caveats. It's how Oracle will handle it IF it ran right now as the explain plan user with the db settings as they are now for the database you are connecting to - the db, the user and the settings could be different from what the environment as it was when the trace file was generating.
user_tables is actually a view, and the plan reveals stuff under the view required to support it.
Business Accounts
Answer for Membership
by: AndytwPosted on 2009-10-14 at 15:09:21ID: 25575724
The PROF$PLAN_TABLE table is what TKPROF uses to write the execute plan information before it writes to the output file, when TKPROF is run with the EXPLAIN command argument.
If the table doesn't exist then it is created automatically by TKPROF, then dropped at the end. As such the specified user (e.g. EXPLAIN=scott/tiger) must be able to issue CREATE TABLE and DROP TABLE statements. The specified user must be able to issue INSERT, SELECT, and DELETE statements against this table.
Your error suggests that the user doesn't have the privileges above. Can you check the privileges of the specified user (PROF$)?