Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Logged on Users

$
0
0
SET linesize 200 PAGESIZE 1000 FEED OFF;
COLUMN "sid,serial#" FORMAT A12
COLUMN "pid" FORMAT 999
COLUMN "status" FORMAT A8
COLUMN "schema" FORMAT A10
COLUMN "osuser" FORMAT A10
COLUMN "box" FORMAT A16
COLUMN "prg" FORMAT A30
--
SELECT
       ''''
    || s.sid
    || ','
    || s.serial#
    || ''';'                       "sid,serial#"
     , p.spid                        "pid"
     , s.status                      "status"
     , s.schemaname                  "schema"
     , s.osuser                      "osuser"
     , s.machine                     "box"
     , s.program                     "prg"
     , TO_CHAR(s.logon_time, 'DD.MM.YYYY HH24:MI') "logon_time"
  FROM
       v$session s,
       v$process p
WHERE s.paddr  = p.addr
ORDER BY s.username
/

Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>