Query to find the SQL which is running as a specific user

Sunday, April 15, 2018

Query to find the SQL which is running as a specific user

Query to find the SQL which is running as a specific user

SELECT VS.USERNAME,
       VS.MACHINE,
       VS.PROGRAM,
       VS.STATUS,
       VST.SQL_ID,
       VST.PIECE,
       VST.SQL_TEXT
  FROM V$SESSION VS, V$SQLTEXT VST
 WHERE VS.SQL_ID = VST.SQL_ID
   AND VS.USERNAME = 'USER'
 ORDER BY VST.SQL_ID, VST.PIECE;

No comments

Post a Comment

Error 404

The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.

Go to Homepage