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

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

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

Oracle 15 Apr 2018

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;
Share: