Tuesday, December 09, 2008

How to find out sid of a query running?

How to find out session id of a sql that is running?

SELECT s.sid FROM v$session s, v$sqlarea a,v$process p WHERE s.SQL_HASH_VALUE = a.HASH_VALUE AND s.SQL_ADDRESS = a.ADDRESS AND s.PADDR = p.ADDR and a.sql_text like '%ALTER INDEX%';

Note: Where sql_text is some unique part of the sql running

No comments:

Integrate Oracle ADF with Oracle E-Business Sutie 12.2 ASCP Instance

Integrate Oracle ADF with Oracle E-Business Suite 12.2 ASCP Instance for  SPWA - Supply Planning Work Area What is  Oracle ADF? Orac...