Skip to content

Commit

Permalink
added port and machine
Browse files Browse the repository at this point in the history
  • Loading branch information
jkstill committed Mar 27, 2024
1 parent 20b43ec commit b6da6c1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sql/who_protocol.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@

@clears

set line 200
set linesize 220 trimspool on
set pagesize 100

col username format a15
col machine format a30
col port format 999999 head 'PORT'
col sid format 999999
col serial# format 999999
col AUTHENTICATION_TYPE format a20
col osuser format a15
col NETWORK_SERVICE_BANNER format a80
col client_driver format a9 head 'CLIENT|DRIVER'
col client_driver format a30 head 'CLIENT|DRIVER'

select
s.username,
s.sid,
s.serial#,
--p.pid ppid,
si.osuser,
s.machine,
s.port, -- this is the client port# from the server perspective, not from the client machine
si.client_driver,
substr(si.NETWORK_SERVICE_BANNER,1,80) NETWORK_SERVICE_BANNER
from v$session s, v$process p, v$session_connect_info si
Expand Down

0 comments on commit b6da6c1

Please sign in to comment.