[root@zza-server: /u01/apex/utilities/debug]# rlwrap sqlplus /nolog SQL*Plus: Release 11.2.0.2.0 Production on Sun May 27 20:02:17 2018 Copyright (c) 1982, 2011, Oracle. All rights reserved. SQL> connect sys as sysdba Enter password: Connected. SQL> @activity help ...activity.sql help Usage: activity.sql arg1,arg2,... Arguments: - help ....................... print argument help and exit - now ........................ set date to sysdate - now=YYYY-MM-DD_HH24:MI:SS .. set to date (time parts are optional, default sysdate) - last_minutes=nnn ........... look back nnn minutes (default 5) - last_days=nnn .............. look back nnn days (default 5 minutes) - app=nnn .................... just application nnn - page=nnn ................... just page nnn - workspace=WSNAME ........... just workspace with name WSNAME - session=nnn ................ just session nnn - user=USERNAME .............. just user USERNAME - ip-address=a.b.c.d ......... just IP address a.b.c.d (if no address given, entries with ip address) - error ...................... just show activity with errors - error=XXX .................. just with errors like XXX (e.g. ORA-00942%) Example: What errors occurred in the last 2 days? SQL> @activity last_days=2,error Example: What happened on 15h October 2015 between 9:00 and 10:00 in app 100? SQL> @activity now=2015-10-15_10:00,last_minutes=60,app=100 PL/SQL procedure successfully completed. SQL> @activity last_days=1 ...activity.sql last_days=1 TIME ELAP APP:PAGE SESSION VIEW_TYPE USER DEBUG ERROR -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2018-05-27 13:08:44 0.043 4500:1000 303768028132 Rendering nobody 2018-05-27 13:08:44 0.029 4550:1 3471196831252 Rendering nobody 2018-05-27 13:08:44 0.027 4550:1 3820907876090 Rendering nobody 2018-05-27 18:54:33 0.049 4500:1000 12697450779493 Rendering nobody 2018-05-27 18:54:33 0.039 4500:1000 15101452928910 Rendering nobody 2018-05-27 18:54:34 0.063 4550:1 15101452928910 Rendering nobody 2018-05-27 18:54:34 0.075 4550:1 12697450779493 Rendering nobody 2018-05-27 18:54:44 0.060 4550:1 15101452928910 Rendering nobody 2018-05-27 18:56:45 0.064 4550:1 15101452928910 Rendering nobody 2018-05-27 19:44:20 0.043 4550:1 15101452928910 Rendering nobody 2018-05-27 19:44:22 0.049 4550:1 15101452928910 Rendering nobody 2018-05-27 19:47:49 0.059 4550:1 13306847707638 Rendering nobody 2018-05-27 19:47:49 0.043 4500:1000 12458066593730 Rendering nobody 2018-05-27 19:47:49 0.041 4500:1000 13306847707638 Rendering nobody 2018-05-27 19:47:49 0.066 4550:1 12458066593730 Rendering nobody 2018-05-27 19:47:55 0.041 4050:3 1291415204857 Rendering nobody 2018-05-27 19:47:56 0.055 4550:10 1291415204857 Rendering nobody 2018-05-27 19:48:02 0.051 4550:10 1291415204857 Rendering nobody 2018-05-27 19:49:42 0.057 4550:10 1291415204857 Rendering nobody PL/SQL procedure successfully completed. SQL>