How to detect the SQL statement that the reception is being issued?
Software Environment:
1, Windows 2000 Oracle 8.1.6
2, the Oracle installation path is: C: / ORANT
Implementation:
You can use the following statement:
SELECT User_name, SQL_Text
From V $ OPEN_CURSOR
WHERE SID IN (SELECT SID, SERIAL FROM V $ session
Where status = 'active'))))
Subquerice
SELECT SID, Serial from V $ Session
Where status = 'Active'
Isolated is the SID of the inactive session.
SQL> DESC V $ OPEN_CURSOR
Name empty? Type
------------------------------------- -----------
Saddr Raw (4)
Sid Number
User_name varchar2 (30)
Address Raw (4)
Hash_Value Number
SQL_Text Varchar2 (60)