set autotrace issue

Hi,
I have a schema which has a PLAN_TABLE and also has the PLUSTRACE role and SELECT_CATALOG_ROLE granted to it.
I typed the below sql command

SQL> set autotrace traceonly explain statistics
SQL> select * from tab;

188 rows selected.

Elapsed: 00:00:00.02

Execution Plan
----------------------------------------------------------
ERROR:
ORA-01039: insufficient privileges on underlying objects of the view


SP2-0612: Error generating AUTOTRACE EXPLAIN report

Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
        751  consistent gets
          9  physical reads
          0  redo size
       7493  bytes sent via SQL*Net to client
        767  bytes received via SQL*Net from client
         14  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
        188  rows processed
Why is the error coming,whats the fix
suhinrasheedAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vishal68Commented:
Tab is view based on sys tables. A normal user does not have privileges on these tables. that is why you getting this error. try a select on one of your owned tables.

HTH
Vishal

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Naveen KumarProduction Manager / Application Support ManagerCommented:
check whether explain plan command works fine because looks like you are getting error while doing explain plan like

explain plan set statement_id = 'S1'
for select sysdate from dual;

select * from plan_table;

Thanks
AkenathonCommented:
I agree with vishal68, you can try the same while connected as sys and it will work fine... you can also try "select * from dual" to verify nothing is broken. In fact, this is expected behaviour!
Computer101Commented:
Forced accept.

Computer101
EE Admin
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.