Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

V$SESSION.SQL_ID points to stored procedure name not the actual SQL

TomOct 4 2016 — edited Oct 9 2016

DB Version:11.2.0.4

OS : RHEL 6.5

A stored proc which usually takes only 2 hours to complete is taking more than 5 hours today.

In this stored proc, there are 2 SELECT queries (explicit cursors),  one INSERT and one DELETE done in loop.

I got the SQL_ID from V$SESSION. But, when I searched for that SQL_ID in v$sql view, i only got the stored procedure name.

I want to know the actual SQL  the stored procedure is currently executing ie. I would like to know where  the store proc is stuck at

select sql_text from v$sql where sql_id = '0xd49nncj5bdh' ;

BEGIN fx_utl_pkg.process_curr_month(:A0,:A1,:A2,:A3); END;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2016
Added on Oct 4 2016
12 comments
7,813 views