20 January 2011

ORACLE SQL View Sessions with PID


set echo off;
set termout on;
set linesize 80;
set pagesize 60;
set newpage 0;
set heading off;
select 'Sessions on database '||substr(name,1,8) from v$database;
set heading on;
select
substr(a.spid,1,9) pid,
substr(b.sid,1,5) sid,
substr(b.serial#,1,5) ser#,
substr(b.machine,1,6) box,
substr(b.username,1,10) username,
substr(b.osuser,1,8) os_user,
substr(b.program,1,30) program
from v$session b, v$process a where
b.paddr = a.addr
and type='USER'
order by spid;

No comments:

APACHE - failed to start

[On] Red Hat Enterprise Linux Server release 7.4 (Maipo) Apache was not running and attempt to start the httpd service failed. The natural t...