Archive for the ‘Session’

Instance Background Processes Information

This script displays instance background process information. The script works when the database is MOUNTed or OPENed. -- Oracle 8I select A.SID, A.SERIAL#, A.PROGRAM, P.PID, [...][...]


Killing Oracle Sessions

Sessions can be killed from within oracle using the ALTER SYSTEM KILL SESSION syntax. First identify the offending session as follows: SELECT s.sid, s.serial#, s.osuser, s.program FROM v$session s[...]


Show user info including os pid

col "SID/SERIAL" format a10 col username format a15 col osuser format a15 col program format a40 select s.sid || ',' || s.serial# "SID/SERIAL" , s.username , s.osuser , p.spid "OS PID" , s.program from v$session s , v$pr[...]


Sessions sorted by logon time

set lines 100 pages 999 col ID format a15 col osuser format a15 col login_time format a14 select username , osuser , sid || ',' || serial# "ID" , status , to_char(logon_time, 'hh24:mi dd/mm/yy') login_time , last_call_[...]


Show all connected users

set lines 100 pages 999 col ID format a15 select username , sid || ',' || serial# "ID" , status , last_call_et "Last Activity" from v$session where username is not null order by status desc , las[...]


List open cursors per user

set pages 999 select sess.username , sess.sid , sess.serial# , stat.value cursors from v$sesstat stat , v$statname sn , v$session sess where sess.username is not null and sess.sid = stat.sid and stat.statistic# = sn.sta[...]




sponsored link