-- =======================================================================
-- shows the currently running SQl statements, excluding this one
-- =======================================================================
SID SERIAL# USER_NAME
---------- ---------- ------------
SQL_TEXT
----------------------------------------------------------------------------------------------------
99 4352 EM630
SELECT t9.CODE, t9.DATA_CENTER, t9.DB_BASE_LEVEL, t9.DB_UPDATE_LEVEL, t9.ACTIVE_NET_NAME, t9.PLATFOR
M, t9.PROTOCOL, t9.CONTROL_M_VER, t9.CONTROL_R, t9.TIME_ZONE, t9.CTM_DAILY_TIME, t9.SUMMER_TIME, t9.
CTM_ODATE, t9.ENABLED, t9.CTM_HOST_NAME, t9.CTM_PORT_NUMBER, t9.GTW_HOST_NAME, t9.GTW_PORT_NUMBER, t
9.DESCRIPTION, t9.CONTACT, t9.LEVEL1, t9.LEVEL2, t9.LEVEL3, t9.LEVEL4, t9.LEVEL5, t9.CTM_ADMIN_PORT,
t9.DESIRED_STATE, t9.START_DAY_OF_WEEK, t9.START_DST_DATE, t9.END_DST_DATE, t9.CMC_MANAGED, t9.UPPE
RCASE, t9.CONTROL_B, t9.CONTROL_T FROM COMM t9
=================inicio==================================================================================
set pagesize 60
set newpage 1
set linesize 200
COL sql_text FOR a100 wrap
COL user_name FOR a12
SELECT u.sid, u.serial#,SUBSTR(u.username,1,12) user_name, s.sql_text
FROM V$SQL s, V$SESSION u
WHERE s.hash_value = u.sql_hash_value
AND sql_text
not like '%from v$sql s, v$session u%'
ORDER BY u.sid;
================final ===================================================================================