Database Tuning (MOSC)

MOSC Banner

v$sql_plan + V$open_cursor.

edited Feb 17, 2014 12:00PM in Database Tuning (MOSC) 4 commentsAnswered

q1) My requirement is, i want sql_id from v$session view to query execution plan using dbms_xplan. i tried getting sql_id of running sql from v$open_cursor but it showing so many sql_id s for one sid. so how can we check from v$open_cursor that which sql_id is belongs to currently running sid which i have seen in v$session view?

q2) is there a script if i give it a sid or ospid then it gives us exicution_plan of the currently running query + diffrent waits it has gone through using v$active_session_history view?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center