Longops

-- Set the linesize (page size) and pagesize

SET LINESIZE 120; -- Adjust based on your desired line size

SET PAGESIZE 50;  -- Adjust based on your desired page size


-- Set column formatting

COLUMN spid FORMAT 99999

COLUMN pid FORMAT 99999

COLUMN username FORMAT A15

COLUMN osuser FORMAT A15

COLUMN status FORMAT A10

COLUMN sid FORMAT 99999

COLUMN program FORMAT A30


-- Execute your query

SELECT p.spid, p.pid, s.username, s.osuser, s.status, s.sid, s.program

FROM v$process p

JOIN v$session s ON s.paddr = p.addr

WHERE s.status = 'ACTIVE' 

  AND s.program NOT LIKE 'oracle@%'  -- Exclude Oracle processes

  AND s.program NOT LIKE 'J00%'     -- Adjust to exclude other background processes

  AND s.program NOT LIKE '%BACKGROUND%'

ORDER BY s.status;

Comments

Popular posts from this blog

SQL Loader V3

Db Unix

Standby redo log add