Getting Actual Execution Plan in Oracle 11g

前端 未结 2 1284
南方客
南方客 2021-01-15 00:38

I have read this post and this excellent article

My question is, how to get the acutual execution plan in Oracle 11g

without

相关标签:
2条回答
  • 2021-01-15 01:02

    If you want to use dbms_xplan.display_cursor, you'll need at least these grants:

    grant select on sys.v_$sql_plan to larry;
    grant select on sys.v_$session to larry;
    grant select on sys.v_$sql_plan_statistics_all to larry;
    

    And you'll probably also need V$SQL to find the SQL_ID:

    grant select on sys.v_$sql to larry;
    
    0 讨论(0)
  • 2021-01-15 01:05

    If you're developer, maybe I can request SELECT_CATALOG_ROLE to be granted you. In 11g it is harmless to grant it. This will allow read-only access to most of the information DBAs have.

    This will give you an access to v$sql_plan*, v$session_longops, V$lock, V$SQL_BIND_CAPTURE and other performance related data.

    0 讨论(0)
提交回复
热议问题