Firebird - List last command from each connection


You can do this with this select:

select 
MON$SERVER_PID as PID,
a.MON$REMOTE_ADDRESS as IP,
a.MON$REMOTE_PROCESS as Program,
MON$PAGE_READS as DiskRead,
MON$PAGE_WRITES as DiskWriters,
s.MON$SQL_TEXT as SQL
from
MON$ATTACHMENTS a,
MON$IO_STATS i, MON$STATEMENTS s
where 
a.MON$STAT_ID = i.MON$STAT_ID 
and a.MON$ATTACHMENT_ID = s.MON$ATTACHMENT_ID
order by  MON$PAGE_READS desc

Comments

Popular posts from this blog

Impacket-master - psexec for linux

Openedge (Progress) - List transaction cache