ba6.us - Dave's Database Related Stuff

  • home
  • blog
  • notes
  • projects
  • recent
  • about
  • !
Home

Tag Cloud

apex data development export funnies Hint HTML import linux monitoring oem oracle performance perl pl/sql reporting rman scripting solaris sql sqlplus tuning unix windows
more tags

Search

RSS Feed

Blog Posts :

Navigation

  • Feed aggregator

User login

  • Request new password

GATHER_PLAN_STATISTICS

DBMS_XPLAN.DISPLAY_CURSOR and "User has no SELECT privilege"

dmann — Tue, 11/24/2009 - 15:51

I have been making use of the GATHER_PLAN_STATISTICS hint more and more lately. In the interest of getting the most accurate data I usually log in as the user that normally executes the query. These are usually non-privileged accounts that just have access to their own objects.

In order to use DBMS_XPLAN.DISPLAY_CURSOR in a session that does not have DBA or SELECT CATALOG ROLE, grant the following permissions to them:

SQL> GRANT SELECT ON V_$SESSION TO &&MYUSER;
SQL> GRANT SELECT ON V_$SQL TO &&MYUSER;
 Read more »
  • DBMS_XPLAN
  • Explain Plan
  • GATHER_PLAN_STATISTICS
  • dmann's blog
  • Add new comment
Syndicate content


Cornify
  • home
  • blog
  • notes
  • projects
  • recent
  • about
  • !

Content Copyright 2006-2010. Links are copyright of respective owners.