findit.sql

-- 
-- Title :       findit.sql 
-- Description : To list session id given an OS 
--               process number. 
-- 
-- Usage/Notes : Extra linefeeds, CHR(10), used 
--               for emphasis. 
-- 
-- Copyright :   ABCdba.com 2002 
-- 
 
SET TERMOUT OFF 
STORE SET save_env.sql REPLACE 
SET TERMOUT ON 
 
CLEAR BREAKS 
CLEAR COLUMNS 
CLEAR COMPUTES 
 
SET PAGESIZE 20 
SET WRAP ON 
SET FEEDBACK OFF 
SET HEADING OFF 
SET VERIFY OFF 
 
SELECT 
CHR(10)|| 
'Check for SESSION ID ----> '||LPAD( s.sid, 4 ) 
||CHR(10)||CHR(10) 
FROM 
v$session s, v$process p 
WHERE 
p.addr = s.paddr AND 
p.spid = &Enter_OSPid 
/ 
 
@save_env.sql 
host rm save_env.sql 
SET TERMOUT ON

© copyright 2001-2014 ABCdba.com | all rights reserved